pref(api): import and export of CIType templates

pref(api): import and export of CIType templates
This commit is contained in:
pycook
2023-12-22 14:32:03 +08:00
committed by GitHub
parent c430515377
commit 20f3e917fe
11 changed files with 363 additions and 159 deletions

View File

@@ -189,7 +189,8 @@ class AttributeManager(object):
return attr
def get_attribute(self, key, choice_web_hook_parse=True, choice_other_parse=True):
attr = AttributeCache.get(key).to_dict()
attr = AttributeCache.get(key) or dict()
attr = attr and attr.to_dict()
if attr.get("is_choice"):
attr["choice_value"] = self.get_choice_values(
attr["id"],