Skip to content

Commit

Permalink
Merge pull request #73 from RegioneER/issue_28866
Browse files Browse the repository at this point in the history
Sort solr keywords vocabulary in alphabetical order
  • Loading branch information
cekk authored Jan 15, 2025
2 parents 6d26ccd + c5e70b6 commit 712c297
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Changelog

- Add Plone Site Setup: Overview permission to ElevateManager to be able to access elevate controlpanel.
[cekk]

- Sort solr keywords vocabulary in alphabetical order.
[cekk]

1.5.4 (2024-12-06)
------------------
Expand Down
2 changes: 1 addition & 1 deletion src/rer/solrpush/vocabularies.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_terms(self):
terms.append(
SimpleTerm(value=key, token=key.encode("utf-8"), title=key)
)
return terms
return sorted(terms, key=lambda x: x.title.lower())

def __call__(self, context):
return SimpleVocabulary(self.get_terms(), swallow_duplicates=True)
Expand Down

0 comments on commit 712c297

Please sign in to comment.