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 2018/08/03 22:34:05 UTC

[incubator-superset] branch master updated: Remove function since_until_to_time_range (#5560)

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 89b7ca0  Remove function since_until_to_time_range (#5560)
89b7ca0 is described below

commit 89b7ca06239ba32231c79403312ece1cd0f639dc
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Fri Aug 3 15:34:03 2018 -0700

    Remove function since_until_to_time_range (#5560)
    
    It's taken care of earlier in the pipeline with legacy.update_time_range
---
 superset/utils.py | 9 ---------
 superset/viz.py   | 2 --
 2 files changed, 11 deletions(-)

diff --git a/superset/utils.py b/superset/utils.py
index c0c0740..d40e657 100644
--- a/superset/utils.py
+++ b/superset/utils.py
@@ -946,15 +946,6 @@ def get_since_until(form_data):
     return since, until
 
 
-def since_until_to_time_range(form_data):
-    if 'time_range' in form_data:
-        return
-
-    since = form_data.get('since', '')
-    until = form_data.get('until', 'now')
-    form_data['time_range'] = ' : '.join((since, until))
-
-
 def convert_legacy_filters_into_adhoc(fd):
     mapping = {'having': 'having_filters', 'where': 'filters'}
 
diff --git a/superset/viz.py b/superset/viz.py
index 7ba8645..c9eea34 100644
--- a/superset/viz.py
+++ b/superset/viz.py
@@ -67,8 +67,6 @@ class BaseViz(object):
         if not datasource:
             raise Exception(_('Viz is missing a datasource'))
 
-        utils.since_until_to_time_range(form_data)
-
         self.datasource = datasource
         self.request = request
         self.viz_type = form_data.get('viz_type')