mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 20:12:00 -06:00
#1556: Swapped label and value
This commit is contained in:
parent
0c645b12d1
commit
abfe71bb04
@ -123,13 +123,13 @@ class FieldChoicesViewSet(ViewSet):
|
|||||||
if type(v) in [list, tuple]:
|
if type(v) in [list, tuple]:
|
||||||
for k2, v2 in v:
|
for k2, v2 in v:
|
||||||
choices.append({
|
choices.append({
|
||||||
'value': v2,
|
'value': k2,
|
||||||
'label': k2,
|
'label': v2,
|
||||||
})
|
})
|
||||||
else:
|
else:
|
||||||
choices.append({
|
choices.append({
|
||||||
'value': v,
|
'value': k,
|
||||||
'label': k,
|
'label': v,
|
||||||
})
|
})
|
||||||
self._fields[key] = choices
|
self._fields[key] = choices
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user