Do not store duplicate categories

This commit is contained in:
tcely authored and GitHub committed 2025-02-03 08:12:09 -05:00
1 parent 869e04dd53
commit d1f078cf0c
1 file changed
+1 -1
+1 -1
View File
@@ -180,7 +180,7 @@ class CommaSepChoiceField(models.CharField):
return '' return ''
if data.all_choice in value: if data.all_choice in value:
return data.all_choice return data.all_choice
return data.separator.join(value) return data.separator.join(set(reversed(value)))
# extra functions not used by any parent classes # extra functions not used by any parent classes
def get_all_choices(self): def get_all_choices(self):