Update sqlmodel/_compat.py

Co-authored-by: John Pocock <John-P@users.noreply.github.com>
This commit is contained in:
John Lyu 2024-12-12 10:41:35 +08:00 committed by GitHub
parent 7173b44a5c
commit 84d739e0e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -70,7 +70,7 @@ def set_polymorphic_default_value(
self_instance: _TSQLModel,
values: Dict[str, Any],
) -> bool:
"""By defalut, when init a model, pydantic will set the polymorphic_on
"""By default, when init a model, pydantic will set the polymorphic_on
value to field default value. But when inherit a model, the polymorphic_on
should be set to polymorphic_identity value by default."""
cls = type(self_instance)