fix: Cloud sync related issues (#13396)

Co-authored-by: feng <1304903146@qq.com>
pull/13397/head
fit2bot 2024-06-11 17:42:13 +08:00 committed by GitHub
parent cd1f6a9137
commit 8b7f60d43e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -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