Skip to content

Commit

Permalink
fix(search): remove compatibility code
Browse files Browse the repository at this point in the history
  • Loading branch information
nsantacruz committed Dec 6, 2023
1 parent 4ae2c10 commit c05388c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reader/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4219,7 +4219,7 @@ def search_wrapper_api(request, es6_compat=False):
search_obj = get_query_obj(search_obj=search_obj, **j)
response = search_obj.execute()
if response.success():
response_json = getattr(response.to_dict(), 'body', response.to_dict())
response_json = response.to_dict().body
if es6_compat and isinstance(response_json['hits']['total'], dict):
response_json['hits']['total'] = response_json['hits']['total']['value']
return jsonResponse(response_json, callback=request.GET.get("callback", None))
Expand Down

0 comments on commit c05388c

Please sign in to comment.