mirror of https://github.com/jumpserver/jumpserver
parent
cd1f6a9137
commit
8b7f60d43e
|
@ -155,7 +155,10 @@ class AllTypes(ChoicesMixin):
|
|||
choices = cls.serialize_to_objs(Category.choices)
|
||||
mapper = dict(cls.grouped_choices())
|
||||
for choice in choices:
|
||||
children = cls.serialize_to_objs(mapper[choice['value']])
|
||||
choices = mapper.get(choice['value'])
|
||||
if not choices:
|
||||
continue
|
||||
children = cls.serialize_to_objs(choices)
|
||||
choice['children'] = children
|
||||
return choices
|
||||
|
||||
|
|
Loading…
Reference in New Issue