From 9418a315b6dadd2d4303c88761cf88b1ea4f1ebd Mon Sep 17 00:00:00 2001 From: Ian Costanzo Date: Wed, 5 Oct 2022 15:43:44 -0700 Subject: [PATCH] fixed some startup errors/warnings Signed-off-by: Ian Costanzo --- server/vcr-server/agent_webhooks/utils/credential.py | 4 ++-- server/vcr-server/api/v2/search/filters.py | 2 +- server/vcr-server/api/v3/search_filters.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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(" ")