Commit 21b5c43c authored by Paul Brown's avatar Paul Brown

fix hybrid properties after adding column object support

parent a439e439
...@@ -484,7 +484,10 @@ class ModelView(BaseModelView): ...@@ -484,7 +484,10 @@ class ModelView(BaseModelView):
"Failed on: {0}".format(c)) "Failed on: {0}".format(c))
else: else:
# column is in same table, use only model attribute name # column is in same table, use only model attribute name
column_name = column.key if getattr(column, 'key') is not None:
column_name = column.key
else:
column_name = text_type(c)
# column_name must match column_name used in `get_list_columns` # column_name must match column_name used in `get_list_columns`
result[column_name] = column result[column_name] = column
...@@ -517,7 +520,10 @@ class ModelView(BaseModelView): ...@@ -517,7 +520,10 @@ class ModelView(BaseModelView):
column_name = text_type(c) column_name = text_type(c)
else: else:
# column is in same table, use only model attribute name # column is in same table, use only model attribute name
column_name = column.key if getattr(column, 'key') is not None:
column_name = column.key
else:
column_name = text_type(c)
visible_name = self.get_column_name(column_name) visible_name = self.get_column_name(column_name)
......
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