Converting filter argument to number if column is number (#2891)

This commit is contained in:
fabianmenges 2017-06-02 11:13:46 -04:00 committed by Maxime Beauchemin
parent 677c427b16
commit 62bd4eb211
1 changed files with 3 additions and 1 deletions

View File

@ -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)