Skip to content

Commit

Permalink
Fix sorting of keyword sets.
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-ide committed Jan 10, 2024
1 parent d6107bd commit f638490
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webapp/home/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1662,7 +1662,8 @@ def get_keywords_for_import(eml_node):
keyword_groups[thesaurus] = keyword_groups.get(thesaurus, []) + [(keyword_node.id, keyword)]
for key in keyword_groups:
keyword_groups[key].sort(key=lambda x: x[1].lower())
return keyword_groups, \
sorted_dict = {key: keyword_groups[key] for key in sorted(keyword_groups)}
return sorted_dict, \
[(a, b) for a, b, _, _ in sorted(keyword_tuples, key=lambda x: (x[3].lower(), x[2].lower()))]

form = ImportItemsForm()
Expand Down

0 comments on commit f638490

Please sign in to comment.