Skip to content

Commit

Permalink
service: fix sort param modifying sort options variable
Browse files Browse the repository at this point in the history
* partially closes zenodo/rdm-project#177
  • Loading branch information
jrcastro2 authored and zzacharo committed Sep 27, 2023
1 parent 42d1f22 commit e34ae2a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions invenio_communities/communities/services/sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def apply(self, identity, search, params):

if current_app.config["COMMUNITIES_SEARCH_SORT_BY_VERIFIED"]:
fields = self._compute_sort_fields(params)
fields.insert(0, "-is_verified")
return search.sort(*fields)
return search.sort(*["-is_verified", *fields])

return super(CommunitiesSortParam, self).apply(identity, search, params)

0 comments on commit e34ae2a

Please sign in to comment.