Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed some startup errors/warnings #735

Merged
merged 1 commit into from
Oct 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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