fix: Cloud sync related issues (#13396)

Co-authored-by: feng <1304903146@qq.com>
This commit is contained in:
fit2bot
2024-06-11 17:42:13 +08:00
committed by GitHub
parent cd1f6a9137
commit 8b7f60d43e

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