mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
[bugfix] IS NOT NULL filter triggers KeyError: 'val' (#5764)
This commit is contained in:
parent
ba4b8a033b
commit
6c6ea3730b
@ -724,13 +724,13 @@ def to_adhoc(filt, expressionType='SIMPLE', clause='where'):
|
|||||||
|
|
||||||
if expressionType == 'SIMPLE':
|
if expressionType == 'SIMPLE':
|
||||||
result.update({
|
result.update({
|
||||||
'comparator': filt['val'],
|
'comparator': filt.get('val'),
|
||||||
'operator': filt['op'],
|
'operator': filt.get('op'),
|
||||||
'subject': filt['col'],
|
'subject': filt.get('col'),
|
||||||
})
|
})
|
||||||
elif expressionType == 'SQL':
|
elif expressionType == 'SQL':
|
||||||
result.update({
|
result.update({
|
||||||
'sqlExpression': filt[clause],
|
'sqlExpression': filt.get(clause),
|
||||||
})
|
})
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
Loading…
Reference in New Issue
Block a user