Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#616 | considering sort parameters without s…
Browse files Browse the repository at this point in the history
…earch param
  • Loading branch information
snyaggarwal committed Mar 2, 2021
1 parent f9124cf commit 1fa6344
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/common/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,10 @@ def should_perform_es_search(self):
else:
result = SEARCH_PARAM in self.request.query_params

return result or self.has_searchable_extras_fields() or bool(self.get_faceted_filters())
sort_field, _ = self.get_sort_and_desc()
return result or self.has_searchable_extras_fields() or bool(
self.get_faceted_filters()
) or self.is_valid_sort(sort_field)

def has_searchable_extras_fields(self):
return bool(
Expand Down

0 comments on commit 1fa6344

Please sign in to comment.