Commit 5a66f8a4 authored by Serge S. Koval's avatar Serge S. Koval

Merge pull request #1240 from pawl/fix_hybrid_properties

fix hybrid_property TypeError introduced by #1209
parents 098ede1e b47b423b
......@@ -484,7 +484,7 @@ class ModelView(BaseModelView):
"Failed on: {0}".format(c))
else:
# column is in same table, use only model attribute name
if getattr(column, 'key') is not None:
if getattr(column, 'key', None) is not None:
column_name = column.key
else:
column_name = text_type(c)
......@@ -520,7 +520,7 @@ class ModelView(BaseModelView):
column_name = text_type(c)
else:
# column is in same table, use only model attribute name
if getattr(column, 'key') is not None:
if getattr(column, 'key', None) is not None:
column_name = column.key
else:
column_name = text_type(c)
......
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