Skip to content

Commit

Permalink
Set Subgroup objects sort_key to float
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunga001 committed Dec 3, 2024
1 parent fed1a69 commit c13d964
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/senaite/core/upgrade/v02_06_000.py
Original file line number Diff line number Diff line change
Expand Up @@ -2733,5 +2733,7 @@ def reindex_sub_groups(tool):
for brain in cat(portal_type="SubGroup"):
obj = brain.getObject()
logger.info("Reindex sub group: %r" % obj)
if obj.sort_key:
obj.sort_key = api.to_float(obj.sort_key)
obj.reindexObject(idxs=["sortable_title"], update_metadata=False)
logger.info("Reindexing sub groups [DONE]")

0 comments on commit c13d964

Please sign in to comment.