We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 981c2a5 commit 3335eccCopy full SHA for 3335ecc
tyadmin_api_cli/antd/field.py
@@ -133,7 +133,8 @@ def valueEnum_factory(field):
133
# 字段下拉选择渲染
134
if field.__class__.__name__ == "TimeZoneField":
135
field_choices_list = []
136
- for field_one in field.CHOICES:
+ choices = 'CHOICES' if hasattr(field, 'CHOICES') else 'choices'
137
+ for field_one in getattr(field, choices):
138
one_line = f'"{field_one[0]}":"{field_one[1]}"'
139
field_choices_list.append(one_line)
140
return f'valueEnum:{{{",".join(field_choices_list)}}}'
0 commit comments