mirror of https://github.com/jumpserver/jumpserver
parent
11f6a029de
commit
75496cbe91
|
@ -12,7 +12,6 @@ class Category(ChoicesMixin, models.TextChoices):
|
||||||
DATABASE = 'database', _("Database")
|
DATABASE = 'database', _("Database")
|
||||||
CLOUD = 'cloud', _("Cloud service")
|
CLOUD = 'cloud', _("Cloud service")
|
||||||
WEB = 'web', _("Web")
|
WEB = 'web', _("Web")
|
||||||
GPT = 'gpt', "GPT"
|
|
||||||
CUSTOM = 'custom', _("Custom type")
|
CUSTOM = 'custom', _("Custom type")
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
|
@ -155,10 +155,7 @@ class AllTypes(ChoicesMixin):
|
||||||
choices = cls.serialize_to_objs(Category.choices)
|
choices = cls.serialize_to_objs(Category.choices)
|
||||||
mapper = dict(cls.grouped_choices())
|
mapper = dict(cls.grouped_choices())
|
||||||
for choice in choices:
|
for choice in choices:
|
||||||
choices = mapper.get(choice['value'])
|
children = cls.serialize_to_objs(mapper[choice['value']])
|
||||||
if not choices:
|
|
||||||
continue
|
|
||||||
children = cls.serialize_to_objs(choices)
|
|
||||||
choice['children'] = children
|
choice['children'] = children
|
||||||
return choices
|
return choices
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue