mirror of https://github.com/apache/superset.git
[bugfix] empty From date filter NoneType error (#3633)
Error "AttributeError: 'NoneType' object has no attribute 'split'" is fired.
This commit is contained in:
parent
64ef8b14b4
commit
ca67a7a4e9
|
@ -158,6 +158,7 @@ class BaseViz(object):
|
|||
until = form_data.get("until", "now")
|
||||
|
||||
# Backward compatibility hack
|
||||
if since:
|
||||
since_words = since.split(' ')
|
||||
grains = ['days', 'years', 'hours', 'day', 'year', 'weeks']
|
||||
if (len(since_words) == 2 and since_words[1] in grains):
|
||||
|
|
Loading…
Reference in New Issue