perf: Account backup failed (#13420)

Co-authored-by: feng <1304903146@qq.com>
pull/13421/head
fit2bot 2024-06-13 18:20:00 +08:00 committed by GitHub
parent 11f6a029de
commit 75496cbe91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 5 deletions

View File

@ -12,7 +12,6 @@ class Category(ChoicesMixin, models.TextChoices):
DATABASE = 'database', _("Database")
CLOUD = 'cloud', _("Cloud service")
WEB = 'web', _("Web")
GPT = 'gpt', "GPT"
CUSTOM = 'custom', _("Custom type")
@classmethod

View File

@ -155,10 +155,7 @@ class AllTypes(ChoicesMixin):
choices = cls.serialize_to_objs(Category.choices)
mapper = dict(cls.grouped_choices())
for choice in choices:
choices = mapper.get(choice['value'])
if not choices:
continue
children = cls.serialize_to_objs(choices)
children = cls.serialize_to_objs(mapper[choice['value']])
choice['children'] = children
return choices