mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-22 21:16:38 +00:00
Preserve the ordering
set made no guarantees about ordering
This commit is contained in:
parent
bdfd645097
commit
4a5660be8d
@ -180,7 +180,8 @@ 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(set(reversed(value)))
|
ordered_unique = list(dict.fromkeys(value))
|
||||||
|
return data.separator.join(ordered_unique)
|
||||||
|
|
||||||
# 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):
|
||||||
|
Loading…
Reference in New Issue
Block a user