Custom SQL filters not working with Virtual (SQL) dataset containing Jinja template #16371
Closed
3 tasks done
Labels
#bug
Bug report
When using Custom SQL filter in graphs where dataset is Virtual (SQL) dataset containing Jinja template as SQL, superset raises an error.
Expected results
Graph is rendered properly
Actual results
Superset raises
'NoneType' object has no attribute 'upper'
Screenshots
How to reproduce the bug
schema: public
dataset_name: test_table
SQL:
Time-series Bar Chart
Group By
:some_text
Metrics
:count(*)
Filters
as Custom SQL with statementwhere 1=1
Run
Environment
Checklist
Make sure to follow these steps before submitting your issue - thank you!
Additional context
In url parameters of the chart there is parameter
operator
set tonull
In file superset/jinja_context.py line 300
logic doesn't assume that
flt
dictionary can haveoperator
with valueNone
and that's what causes the problemThe text was updated successfully, but these errors were encountered: