Browse Source

#1556: Swapped label and value

Jeremy Stretch 7 years ago
parent
commit
abfe71bb04
1 changed files with 4 additions and 4 deletions
  1. 4 4
      netbox/utilities/api.py

+ 4 - 4
netbox/utilities/api.py

@@ -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,
-                                'label': k2,
+                                'value': k2,
+                                'label': v2,
                             })
                             })
                     else:
                     else:
                         choices.append({
                         choices.append({
-                            'value': v,
-                            'label': k,
+                            'value': k,
+                            'label': v,
                         })
                         })
                 self._fields[key] = choices
                 self._fields[key] = choices