From 84d739e0e4baa659b480bce3db8808feca811bac Mon Sep 17 00:00:00 2001 From: John Lyu Date: Thu, 12 Dec 2024 10:41:35 +0800 Subject: [PATCH] Update sqlmodel/_compat.py Co-authored-by: John Pocock --- sqlmodel/_compat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlmodel/_compat.py b/sqlmodel/_compat.py index 0b91702..3853d52 100644 --- a/sqlmodel/_compat.py +++ b/sqlmodel/_compat.py @@ -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)