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

#1556: Swapped label and value

This commit is contained in:
Jeremy Stretch
2017-10-10 17:47:53 -04:00
parent 0c645b12d1
commit abfe71bb04

View File

@ -123,13 +123,13 @@ class FieldChoicesViewSet(ViewSet):
if type(v) in [list, tuple]:
for k2, v2 in v:
choices.append({
'value': v2,
'label': k2,
'value': k2,
'label': v2,
})
else:
choices.append({
'value': v,
'label': k,
'value': k,
'label': v,
})
self._fields[key] = choices