Skip to content

Commit 20aec3c

Browse files
authored
Use connector registry to fetch the table column class. (apache#2419)
1 parent 4ded37e commit 20aec3c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

superset/views/core.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1792,7 +1792,9 @@ def sqllab_viz(self):
17921792
metrics = []
17931793
for column_name, config in data.get('columns').items():
17941794
is_dim = config.get('is_dim', False)
1795-
col = models.TableColumn(
1795+
SqlaTable = ConnectorRegistry.sources['table']
1796+
TableColumn = SqlaTable.column_cls
1797+
col = TableColumn(
17961798
column_name=column_name,
17971799
filterable=is_dim,
17981800
groupby=is_dim,

0 commit comments

Comments
 (0)