#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]: 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