You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2017/10/10 03:59:13 UTC
[incubator-superset] branch master updated: [bugfix] empty From
date filter NoneType error (#3633)
This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new ca67a7a [bugfix] empty From date filter NoneType error (#3633)
ca67a7a is described below
commit ca67a7a4e983d7fa88f5885ab9393bb7e7f27c5b
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Mon Oct 9 20:59:11 2017 -0700
[bugfix] empty From date filter NoneType error (#3633)
Error "AttributeError: 'NoneType' object has no attribute 'split'" is
fired.
---
superset/viz.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/superset/viz.py b/superset/viz.py
index 953d815..a800bc0 100644
--- a/superset/viz.py
+++ b/superset/viz.py
@@ -158,10 +158,11 @@ class BaseViz(object):
until = form_data.get("until", "now")
# Backward compatibility hack
- since_words = since.split(' ')
- grains = ['days', 'years', 'hours', 'day', 'year', 'weeks']
- if (len(since_words) == 2 and since_words[1] in grains):
- since += ' ago'
+ if since:
+ since_words = since.split(' ')
+ grains = ['days', 'years', 'hours', 'day', 'year', 'weeks']
+ if (len(since_words) == 2 and since_words[1] in grains):
+ since += ' ago'
from_dttm = utils.parse_human_datetime(since)
--
To stop receiving notification emails like this one, please contact
['"commits@superset.apache.org" <co...@superset.apache.org>'].