Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tablemodelview] Fixing JSON api/read serializable issue #6023

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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