File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -281,6 +281,8 @@ def sqlmodel_validate(
281281 from_attributes : bool | None = None ,
282282 context : dict [str , Any ] | None = None ,
283283 update : dict [str , Any ] | None = None ,
284+ by_alias : bool | None = None ,
285+ by_name : bool | None = None ,
284286) -> _TSQLModel :
285287 if not is_table_model_class (cls ):
286288 new_obj : _TSQLModel = cls .__new__ (cls )
@@ -303,6 +305,8 @@ def sqlmodel_validate(
303305 strict = strict ,
304306 from_attributes = from_attributes ,
305307 context = context ,
308+ by_alias = by_alias ,
309+ by_name = by_name ,
306310 self_instance = new_obj ,
307311 )
308312 # Capture fields set to restore it later
Original file line number Diff line number Diff line change @@ -877,6 +877,8 @@ def model_validate( # ty: ignore[invalid-method-override]
877877 from_attributes : bool | None = None ,
878878 context : builtins .dict [str , Any ] | None = None ,
879879 update : builtins .dict [str , Any ] | None = None ,
880+ by_alias : bool | None = None ,
881+ by_name : bool | None = None ,
880882 ) -> _TSQLModel :
881883 return sqlmodel_validate (
882884 cls = cls ,
@@ -885,6 +887,8 @@ def model_validate( # ty: ignore[invalid-method-override]
885887 from_attributes = from_attributes ,
886888 context = context ,
887889 update = update ,
890+ by_alias = by_alias ,
891+ by_name = by_name ,
888892 )
889893
890894 def model_dump (
You can’t perform that action at this time.
0 commit comments