Skip to content

Commit

Permalink
Fix pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
khaledk2 committed Aug 5, 2024
1 parent 9597b3e commit 2e083ad
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions omero_search_engine/api/v1/resources/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def elasticsearch_query_builder(
key = filter.get("name")
if key:
key = key.strip()
#value = filter["value"].strip()
# value = filter["value"].strip()

operator = filter["operator"].strip()
if operator in operators_required_list_data_type:
Expand Down Expand Up @@ -506,7 +506,6 @@ def elasticsearch_query_builder(
)
)


else:
if key:
nested_must_part.append(
Expand All @@ -525,7 +524,7 @@ def elasticsearch_query_builder(
must_not_part=case_insensitive_wildcard_value_condition_template.substitute( # noqa
wild_card_value=value
),
must_part=[]
must_part=[],
)
)
else:
Expand All @@ -547,7 +546,7 @@ def elasticsearch_query_builder(
must_not_part=case_sensitive_wildcard_value_condition_template.substitute( # noqa
wild_card_value=value
),
must_part=''
must_part="",
)
)
else:
Expand All @@ -569,7 +568,7 @@ def elasticsearch_query_builder(
must_not_part=case_insensitive_wildcard_value_condition_template.substitute( # noqa
wild_card_value=value
),
must_part=''
must_part="",
)
)

Expand Down Expand Up @@ -1080,7 +1079,7 @@ def search_resource_annotation(
@query: the a dict contains the three filters (or, and and not) items
@raw_elasticsearch_query: raw query sending directly to elasticsearch
"""
#try:
# try:
res_index = resource_elasticsearchindex.get(table_)
if not res_index:
return build_error_message(
Expand Down Expand Up @@ -1168,7 +1167,7 @@ def search_resource_annotation(
"raw_elasticsearch_query": raw_query_to_send_back,
"notice": notice,
}
#except Exception as e:
# except Exception as e:
# search_omero_app.logger.info("Query %s" % str(query))
# search_omero_app.logger.info("==>>>Error: %s" % str(e))
# return build_error_message(
Expand Down

0 comments on commit 2e083ad

Please sign in to comment.