fix polymorphic_on check
This commit is contained in:
parent
4071b0fc64
commit
48f2a88752
@ -294,7 +294,7 @@ if IS_PYDANTIC_V2:
|
||||
# Override polymorphic_on default value
|
||||
mapper = inspect(cls)
|
||||
polymorphic_on = mapper.polymorphic_on
|
||||
if polymorphic_on:
|
||||
if polymorphic_on is not None:
|
||||
polymorphic_property = mapper.get_property_by_column(polymorphic_on)
|
||||
field_info = cls.model_fields.get(polymorphic_property.key)
|
||||
if field_info:
|
||||
|
Loading…
x
Reference in New Issue
Block a user