mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
[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")
|
until = form_data.get("until", "now")
|
||||||
|
|
||||||
# Backward compatibility hack
|
# Backward compatibility hack
|
||||||
|
if since:
|
||||||
since_words = since.split(' ')
|
since_words = since.split(' ')
|
||||||
grains = ['days', 'years', 'hours', 'day', 'year', 'weeks']
|
grains = ['days', 'years', 'hours', 'day', 'year', 'weeks']
|
||||||
if (len(since_words) == 2 and since_words[1] in grains):
|
if (len(since_words) == 2 and since_words[1] in grains):
|
||||||
|
Loading…
Reference in New Issue
Block a user