File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -642,6 +642,7 @@ def __init__(
642642 rel_args .extend (rel_info .sa_relationship_args )
643643 if rel_info .sa_relationship_kwargs :
644644 rel_kwargs .update (rel_info .sa_relationship_kwargs )
645+ # this where RelationshipInfo objects are converted to lazy column evaluators
645646 rel_value = relationship (relationship_to , * rel_args , ** rel_kwargs )
646647 setattr (cls , rel_name , rel_value ) # Fix #315
647648 # SQLAlchemy no longer uses dict_
@@ -722,8 +723,8 @@ def get_column_from_field(field: PydanticFieldInfo | FieldInfo) -> Column: # ty
722723 sa_column = getattr (field_info , "sa_column" , Undefined )
723724 if isinstance (sa_column , Column ):
724725 # if a db field comment is not already defined, and a description exists on the field, add it to the column definition
725- if not sa_column .comment and ( field_comment := field_info .description ) :
726- sa_column .comment = field_comment
726+ if not sa_column .comment and field_info .description :
727+ sa_column .comment = field_info . description
727728
728729 return sa_column
729730
You can’t perform that action at this time.
0 commit comments