diff --git a/server/vcr-server/agent_webhooks/utils/credential.py b/server/vcr-server/agent_webhooks/utils/credential.py index 669eee1c1..7dbb1ee89 100644 --- a/server/vcr-server/agent_webhooks/utils/credential.py +++ b/server/vcr-server/agent_webhooks/utils/credential.py @@ -677,10 +677,10 @@ def create_search_models( model.format = "category" # skip blank in names and attributes - if model_name == "name" and (model.text is None or model.text is ""): + if model_name == "name" and (model.text is None or model.text == ""): continue if (model_name == "category" or model_name == "attribute") and ( - not model.type or model.value is None or model.value is "" + not model.type or model.value is None or model.value == "" ): continue diff --git a/server/vcr-server/api/v2/search/filters.py b/server/vcr-server/api/v2/search/filters.py index 54078befd..a89f23548 100644 --- a/server/vcr-server/api/v2/search/filters.py +++ b/server/vcr-server/api/v2/search/filters.py @@ -33,7 +33,7 @@ def query_words(self, *parts): def prepare(self, query_obj): # clean input query_string = super(Proximate, self).prepare(query_obj) - if query_string is not "": + if query_string != "": # match phrase with minimal word movements proximity = self.kwargs.get("proximity", 5) parts = query_string.split(" ") diff --git a/server/vcr-server/api/v3/search_filters.py b/server/vcr-server/api/v3/search_filters.py index 2467515a9..49fa72d2c 100644 --- a/server/vcr-server/api/v3/search_filters.py +++ b/server/vcr-server/api/v3/search_filters.py @@ -33,7 +33,7 @@ def query_words(self, *parts): def prepare(self, query_obj): # clean input query_string = super(Proximate, self).prepare(query_obj) - if query_string is not "": + if query_string != "": # match phrase with minimal word movements proximity = self.kwargs.get("proximity", 5) parts = query_string.split(" ")