Fix bug when locating association proxy column
This commit is contained in:
parent
c996bf47ea
commit
f9d1d34763
|
@ -87,9 +87,10 @@ def get_association_proxy_column(inspector, field):
|
|||
"""
|
||||
proxy_target = get_association_proxy_target(inspector, field)
|
||||
if proxy_target:
|
||||
prop = proxy_target.mapper.get_property(field)
|
||||
if isinstance(prop, orm.ColumnProperty) and isinstance(prop.columns[0], sa.Column):
|
||||
return prop
|
||||
if proxy_target.mapper.has_property(field):
|
||||
prop = proxy_target.mapper.get_property(field)
|
||||
if isinstance(prop, orm.ColumnProperty) and isinstance(prop.columns[0], sa.Column):
|
||||
return prop
|
||||
|
||||
|
||||
class CustomSchemaNode(SQLAlchemySchemaNode):
|
||||
|
|
Loading…
Reference in a new issue