Skip to content

Commit 167ee5c

Browse files
committed
perf: list type fields allow parsing into components other than the InputArray.
1 parent bee4866 commit 167ee5c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

fastapi_amis_admin/admin/parser.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ def _get_form_item_from_kwargs(self, modelfield: ModelField, is_filter: bool = F
150150
):
151151
if not isinstance(formitem, FormItem):
152152
formitem = InputArray(**formitem)
153+
elif not isinstance(formitem, InputArray):
154+
return formitem
153155
# Parse the internal type of the list.
154156
kwargs = self.get_field_amis_form_item_type(type_=modelfield.type_, is_filter=is_filter)
155157
update = formitem.items.amis_dict() if formitem.items else {}

0 commit comments

Comments
 (0)