Commit 7bb0ea6d authored by Serge S. Koval's avatar Serge S. Koval

Merge pull request #327 from lu-zero/master

sqla: consider MANYTOMANY in InlineModelConverter
parents cdb4a411 d3008d85
......@@ -545,7 +545,7 @@ class InlineModelConverter(InlineModelConverterBase):
reverse_prop = None
for prop in target_mapper.iterate_properties:
if hasattr(prop, 'direction') and prop.direction.name == 'MANYTOONE':
if hasattr(prop, 'direction'):
if issubclass(model, prop.mapper.class_):
reverse_prop = prop
break
......@@ -556,7 +556,7 @@ class InlineModelConverter(InlineModelConverterBase):
forward_prop = None
for prop in mapper.iterate_properties:
if hasattr(prop, 'direction') and prop.direction.name == 'ONETOMANY':
if hasattr(prop, 'direction'):
if prop.mapper.class_ == target_mapper.class_:
forward_prop = prop
break
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment