Commit 1d5ad50e authored by Serge Koval's avatar Serge Koval

Fixed SQLAlchemy 1.3.6 compatibility issue

parent fe0c818c
......@@ -203,7 +203,7 @@ def is_hybrid_property(model, attr_name):
last_model = attr.property.argument
if isinstance(last_model, _class_resolver):
last_model = model._decl_class_registry[last_model.arg]
elif isinstance(last_model, types.FunctionType):
elif isinstance(last_model, (types.FunctionType, types.MethodType)):
last_model = last_model()
last_name = names[-1]
return last_name in get_hybrid_properties(last_model)
......
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