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 115de85 commit 4499f96Copy full SHA for 4499f96
sqlmodel/main.py
@@ -507,9 +507,10 @@ def __init__(__pydantic_self__, **data: Any) -> None:
507
__pydantic_self__.__class__, data
508
)
509
# Only raise errors if not a SQLModel model
510
- if ((not getattr(__pydantic_self__.__config__, "table", False)
511
- or getattr(__pydantic_self__.__config__, "validate", False))
512
- and validation_error):
+ if (
+ not getattr(__pydantic_self__.__config__, "table", False)
+ or getattr(__pydantic_self__.__config__, "validate", False)
513
+ ) and validation_error:
514
raise validation_error
515
# Do not set values as in Pydantic, pass them through setattr, so SQLAlchemy
516
# can handle them
0 commit comments