File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change 2929from pydantic .fields import FieldInfo as PydanticFieldInfo
3030from pydantic .fields import ModelField , Undefined , UndefinedType
3131from pydantic .main import ModelMetaclass , validate_model
32- from pydantic .typing import ForwardRef , NoArgAnyCallable , resolve_annotations
32+ from pydantic .typing import NoArgAnyCallable , resolve_annotations
3333from pydantic .utils import ROOT_KEY , Representation
3434from sqlalchemy import Boolean , Column , Date , DateTime
3535from sqlalchemy import Enum as sa_Enum
@@ -342,8 +342,6 @@ def __init__(
342342 config = BaseConfig ,
343343 )
344344 relationship_to = temp_field .type_
345- if isinstance (temp_field .type_ , ForwardRef ):
346- relationship_to = temp_field .type_ .__forward_arg__
347345 rel_kwargs : Dict [str , Any ] = {}
348346 if rel_info .back_populates :
349347 rel_kwargs ["back_populates" ] = rel_info .back_populates
You can’t perform that action at this time.
0 commit comments