فهرست منبع

Handle grouped choices when returning ChoiceSet values

Jeremy Stretch 6 سال پیش
والد
کامیت
fe402331f2
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  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):