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

Handle grouped choices when returning ChoiceSet values

This commit is contained in:
Jeremy Stretch
2020-01-23 16:16:52 -05:00
parent fcbbb36afc
commit fe402331f2

View File

@ -18,7 +18,7 @@ class ChoiceSet(metaclass=ChoiceSetMeta):
@classmethod
def values(cls):
return [c[0] for c in cls.CHOICES]
return [c[0] for c in unpack_grouped_choices(cls.CHOICES)]
@classmethod
def as_dict(cls):