1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

14467 change ChoiceField separator from comma to colon (#14469)

* 14467 change ChoiceField separator from comma to colon

* 14467 fix test

* 14467 fix test

* 14467 use regex for colon detection

* 14467 update tests
This commit is contained in:
Arthur Hanson
2023-12-12 11:31:39 -08:00
committed by GitHub
parent 81fa4265da
commit 6939ae4a47
3 changed files with 13 additions and 5 deletions

View File

@ -65,5 +65,5 @@ class ChoicesWidget(forms.Textarea):
if not value:
return None
if type(value) is list:
return '\n'.join([f'{k},{v}' for k, v in value])
return '\n'.join([f'{k}:{v}' for k, v in value])
return value