Skip to content

Commit

Permalink
[bugfix] IS NOT NULL filter triggers KeyError: 'val' (apache#5764)
Browse files Browse the repository at this point in the history
(cherry picked from commit 6c6ea37)
  • Loading branch information
mistercrunch authored and betodealmeida committed Oct 11, 2018
1 parent fe9b8c6 commit c555929
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions superset/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,13 +723,13 @@ def to_adhoc(filt, expressionType='SIMPLE', clause='where'):

if expressionType == 'SIMPLE':
result.update({
'comparator': filt['val'],
'operator': filt['op'],
'subject': filt['col'],
'comparator': filt.get('val'),
'operator': filt.get('op'),
'subject': filt.get('col'),
})
elif expressionType == 'SQL':
result.update({
'sqlExpression': filt[clause],
'sqlExpression': filt.get(clause),
})

return result
Expand Down

0 comments on commit c555929

Please sign in to comment.