✏️ Fix typo in sqlmodel/_compat.py (#950)

This commit is contained in:
Anderson T 2024-06-04 16:56:52 -07:00 committed by GitHub
parent 8703539bf0
commit e7c62fc9d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -194,7 +194,7 @@ if IS_PYDANTIC_V2:
# Non optional unions are not allowed # Non optional unions are not allowed
if bases[0] is not NoneType and bases[1] is not NoneType: if bases[0] is not NoneType and bases[1] is not NoneType:
raise ValueError( raise ValueError(
"Cannot have a (non-optional) union as a SQLlchemy field" "Cannot have a (non-optional) union as a SQLAlchemy field"
) )
# Optional unions are allowed # Optional unions are allowed
return bases[0] if bases[0] is not NoneType else bases[1] return bases[0] if bases[0] is not NoneType else bases[1]