Skip to content

Commit

Permalink
Converting filter argument to number if column is number (#2891)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianmenges authored and mistercrunch committed Jun 2, 2017
1 parent 677c427 commit 62bd4eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion superset/connectors/sqla/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,9 @@ def get_sqla_query( # sqla
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)
Expand Down

0 comments on commit 62bd4eb

Please sign in to comment.