diff --git a/apps/assets/const/category.py b/apps/assets/const/category.py index 9ccbb134e..8c4d387d8 100644 --- a/apps/assets/const/category.py +++ b/apps/assets/const/category.py @@ -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 diff --git a/apps/assets/const/types.py b/apps/assets/const/types.py index b97aa0a3c..b03f22d12 100644 --- a/apps/assets/const/types.py +++ b/apps/assets/const/types.py @@ -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