Skip to content

Commit

Permalink
fix: 更新schema_read默认与schema_list一致
Browse files Browse the repository at this point in the history
  • Loading branch information
amisadmin committed Mar 17, 2022
1 parent d644114 commit 441f0b0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fastapi_amis_admin/crud/_sqlmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ def __init__(self, model: Type[SQLModel], session_factory: Callable[..., AsyncGe
modelfield.validators = []
self.schema_filter = schema_create_by_modelfield(schema_name=self.schema_name_prefix + 'Filter',
modelfields=modelfields, set_none=True)
self.schema_read = self.schema_read or self.schema_list
if not self.schema_update and self.readonly_fields:
exclude = {self.parser.get_modelfield(ins).name for ins in
self.parser.filter_insfield(self.readonly_fields)}
Expand Down

0 comments on commit 441f0b0

Please sign in to comment.