Allow any column to be filterable or groupable (#6764)

This is not configurable and will be the default (and only !) behavior
going forward !
This commit is contained in:
agrawaldevesh 2019-01-30 11:18:49 -08:00 committed by Maxime Beauchemin
parent 36176f3e20
commit 817783f466
1 changed files with 2 additions and 2 deletions

View File

@ -861,13 +861,13 @@ class SqlaTable(Model, BaseDatasource):
dbcol = dbcols.get(col.name, None)
if not dbcol:
dbcol = TableColumn(column_name=col.name, type=datatype)
dbcol.groupby = dbcol.is_string
dbcol.filterable = dbcol.is_string
dbcol.sum = dbcol.is_num
dbcol.avg = dbcol.is_num
dbcol.is_dttm = dbcol.is_time
else:
dbcol.type = datatype
dbcol.groupby = True
dbcol.filterable = True
self.columns.append(dbcol)
if not any_date_col and dbcol.is_time:
any_date_col = col.name