Skip to content

Commit

Permalink
[tablemodelview] Fixing JSON api/read serializable issue
Browse files Browse the repository at this point in the history
  • Loading branch information
John Bodley committed Oct 5, 2018
1 parent 160e477 commit 548b88c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions superset/connectors/sqla/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,10 @@ def description_markeddown(self):
def datasource_name(self):
return self.table_name

@property
def database_name(self):
return self.database.name

@property
def link(self):
name = escape(self.name)
Expand Down
3 changes: 2 additions & 1 deletion superset/connectors/sqla/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class TableModelView(DatasourceModelView, DeleteMixin, YamlExportMixin): # noqa
edit_title = _('Edit Table')

list_columns = [
'link', 'database',
'link', 'database_name',
'changed_by_', 'modified']
order_columns = ['modified']
add_columns = ['database', 'schema', 'table_name']
Expand Down Expand Up @@ -229,6 +229,7 @@ class TableModelView(DatasourceModelView, DeleteMixin, YamlExportMixin): # noqa
'link': _('Table'),
'changed_by_': _('Changed By'),
'database': _('Database'),
'database_name': _('Database'),
'changed_on_': _('Last Changed'),
'filter_select_enabled': _('Enable Filter Select'),
'schema': _('Schema'),
Expand Down

0 comments on commit 548b88c

Please sign in to comment.