Skip to content

Commit

Permalink
fix issue ome#104
Browse files Browse the repository at this point in the history
  • Loading branch information
khaledk2 committed Dec 2, 2024
1 parent 41e702d commit 79f6a54
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions omero_search_engine/api/v1/resources/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1040,8 +1040,13 @@ def search_resource_annotation(
return query_string

search_omero_app.logger.info("Query %s" % query_string)
query = json.loads(query_string, strict=False)
raw_query_to_send_back = json.loads(query_string, strict=False)
from ast import literal_eval

try:
query = literal_eval(query_string)
raw_query_to_send_back = literal_eval(query_string)
except Exception as ex:
raise Exception("Failed to load the query, error: %s" % str(ex))
else:
query = raw_elasticsearch_query
raw_query_to_send_back = copy.copy(raw_elasticsearch_query)
Expand Down

0 comments on commit 79f6a54

Please sign in to comment.