superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maximebeauche...@apache.org
Subject [incubator-superset] branch master updated: [hotfix] user dashboard says '150 weeks' (#3403)
Date Thu, 31 Aug 2017 22:00:23 GMT
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 255a36c  [hotfix] user dashboard says '150 weeks' (#3403)
255a36c is described below

commit 255a36c2806f42ad96538d7a456fe020de708b13
Author: Maxime Beauchemin <maximebeauchemin@gmail.com>
AuthorDate: Thu Aug 31 15:00:21 2017 -0700

    [hotfix] user dashboard says '150 weeks' (#3403)
---
 superset/viz.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/superset/viz.py b/superset/viz.py
index b7f1e63..3f973c7 100644
--- a/superset/viz.py
+++ b/superset/viz.py
@@ -148,9 +148,8 @@ class BaseViz(object):
 
         # Backward compatibility hack
         since_words = since.split(' ')
-        if (
-                len(since_words) == 2 and
-                since_words[1] in ['days', 'years', 'hours', 'day', 'year']):
+        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" <commits@superset.apache.org>'].

Mime
View raw message