Explorar el Código

Handle grouped choices when returning ChoiceSet values

Jeremy Stretch hace 6 años
padre
commit
fe402331f2
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      netbox/utilities/choices.py

+ 1 - 1
netbox/utilities/choices.py

@@ -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):