Skip to content

Commit

Permalink
Merge pull request #735 from ianco/bcgov_master
Browse files Browse the repository at this point in the history
  • Loading branch information
amanji authored Oct 6, 2022
2 parents 08c46bb + 9418a31 commit 7d88b59
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions server/vcr-server/agent_webhooks/utils/credential.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion server/vcr-server/api/v2/search/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(" ")
Expand Down
2 changes: 1 addition & 1 deletion server/vcr-server/api/v3/search_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(" ")
Expand Down

0 comments on commit 7d88b59

Please sign in to comment.