From 62bd4eb2118e4f1e771b58cd455b928be002a461 Mon Sep 17 00:00:00 2001 From: fabianmenges Date: Fri, 2 Jun 2017 11:13:46 -0400 Subject: [PATCH] Converting filter argument to number if column is number (#2891) --- superset/connectors/sqla/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/superset/connectors/sqla/models.py b/superset/connectors/sqla/models.py index 2afcc4d085..894e8eef43 100644 --- a/superset/connectors/sqla/models.py +++ b/superset/connectors/sqla/models.py @@ -477,7 +477,9 @@ class SqlaTable(Model, BaseDatasource): if op == 'not in': cond = ~cond where_clause_and.append(cond) - elif op == '==': + if col_obj.is_num: + eq = utils.string_to_num(flt['val']) + if op == '==': where_clause_and.append(col_obj.sqla_col == eq) elif op == '!=': where_clause_and.append(col_obj.sqla_col != eq)