mirror of https://github.com/apache/superset.git
[hotfix] user dashboard says '150 weeks' (#3403)
This commit is contained in:
parent
66f646ac66
commit
255a36c280
|
@ -148,9 +148,8 @@ class BaseViz(object):
|
||||||
|
|
||||||
# Backward compatibility hack
|
# Backward compatibility hack
|
||||||
since_words = since.split(' ')
|
since_words = since.split(' ')
|
||||||
if (
|
grains = ['days', 'years', 'hours', 'day', 'year', 'weeks']
|
||||||
len(since_words) == 2 and
|
if (len(since_words) == 2 and since_words[1] in grains):
|
||||||
since_words[1] in ['days', 'years', 'hours', 'day', 'year']):
|
|
||||||
since += ' ago'
|
since += ' ago'
|
||||||
|
|
||||||
from_dttm = utils.parse_human_datetime(since)
|
from_dttm = utils.parse_human_datetime(since)
|
||||||
|
|
Loading…
Reference in New Issue