File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -642,6 +642,7 @@ def __init__(
642
642
rel_args .extend (rel_info .sa_relationship_args )
643
643
if rel_info .sa_relationship_kwargs :
644
644
rel_kwargs .update (rel_info .sa_relationship_kwargs )
645
+ # this where RelationshipInfo objects are converted to lazy column evaluators
645
646
rel_value = relationship (relationship_to , * rel_args , ** rel_kwargs )
646
647
setattr (cls , rel_name , rel_value ) # Fix #315
647
648
# SQLAlchemy no longer uses dict_
@@ -722,8 +723,8 @@ def get_column_from_field(field: PydanticFieldInfo | FieldInfo) -> Column: # ty
722
723
sa_column = getattr (field_info , "sa_column" , Undefined )
723
724
if isinstance (sa_column , Column ):
724
725
# 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
727
728
728
729
return sa_column
729
730
You can’t perform that action at this time.
0 commit comments