From f1c4f8669a4ff7a88d32561a490d5b1d1388f655 Mon Sep 17 00:00:00 2001 From: Luca Bellenghi Date: Mon, 14 Oct 2024 16:04:19 +0200 Subject: [PATCH] update vocabularies sorting --- CHANGES.rst | 2 ++ .../plone/contenttypes/vocabularies/reference_vocabularies.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index c3ff363b..f4358a7c 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,6 +6,8 @@ Changelog - Avoid acquisition problem in *onModify* event handler: now try to reindex children only if context is folderish. [cekk] +- Add sort_on sortable_title to event_location, uo_location, ufficio_responsabile vocabularies + [lucabel] 6.2.19 (2024-09-23) ------------------- diff --git a/src/design/plone/contenttypes/vocabularies/reference_vocabularies.py b/src/design/plone/contenttypes/vocabularies/reference_vocabularies.py index bfa2ef40..bab3cdeb 100644 --- a/src/design/plone/contenttypes/vocabularies/reference_vocabularies.py +++ b/src/design/plone/contenttypes/vocabularies/reference_vocabularies.py @@ -28,7 +28,7 @@ def __call__(self, registry=None): if self.catalog is None: return SimpleVocabulary([]) values = self.get_all_index_values() - brains = self.catalog(UID=values) + brains = self.catalog(UID=values, sort_on="sortable_title") terms = [] for brain in brains: terms.append(SimpleTerm(brain.UID, brain.UID, safe_text(brain.Title)))