Skip to content

Commit

Permalink
Fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick91 committed Jan 7, 2022
1 parent 0bcc522 commit a3e1379
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions strawberry/experimental/pydantic/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ def ensure_all_auto_fields_in_pydantic(
model: Type[BaseModel], auto_fields: Set[str], cls_name: str
) -> Union[NoReturn, None]:
# Raise error if user defined a strawberry.auto field not present in the model
non_existing_fields = auto_fields - model.__fields__.keys()
non_existing_fields = list(auto_fields - model.__fields__.keys())

if len(non_existing_fields) > 0:
if non_existing_fields:
raise AutoFieldsNotInBaseModelError(
fields=non_existing_fields, cls_name=cls_name, model=model
)
Expand Down

0 comments on commit a3e1379

Please sign in to comment.