mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-12 03:23:08 +00:00
perf: Account backup failed (#13420)
Co-authored-by: feng <1304903146@qq.com>
This commit is contained in:
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
Block a user