瀏覽代碼

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
     @classmethod
     def values(cls):
     def values(cls):
-        return [c[0] for c in cls.CHOICES]
+        return [c[0] for c in unpack_grouped_choices(cls.CHOICES)]
 
 
     @classmethod
     @classmethod
     def as_dict(cls):
     def as_dict(cls):