Skip to content

Commit

Permalink
Updated formatting to resolve E124 lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewRiggs-Atkins committed Feb 15, 2023
1 parent 115de85 commit 4499f96
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sqlmodel/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,9 +507,10 @@ def __init__(__pydantic_self__, **data: Any) -> None:
__pydantic_self__.__class__, data
)
# Only raise errors if not a SQLModel model
if ((not getattr(__pydantic_self__.__config__, "table", False)
or getattr(__pydantic_self__.__config__, "validate", False))
and validation_error):
if (
not getattr(__pydantic_self__.__config__, "table", False)
or getattr(__pydantic_self__.__config__, "validate", False)
) and validation_error:
raise validation_error
# Do not set values as in Pydantic, pass them through setattr, so SQLAlchemy
# can handle them
Expand Down

0 comments on commit 4499f96

Please sign in to comment.