From commits-return-602-archive-asf-public=cust-asf.ponee.io@superset.incubator.apache.org Wed Feb 7 23:33:08 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id EAF5218065B for ; Wed, 7 Feb 2018 23:33:08 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id DAFA2160C3A; Wed, 7 Feb 2018 22:33:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3001D160C5B for ; Wed, 7 Feb 2018 23:33:08 +0100 (CET) Received: (qmail 16151 invoked by uid 500); 7 Feb 2018 22:33:07 -0000 Mailing-List: contact commits-help@superset.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@superset.incubator.apache.org Delivered-To: mailing list commits@superset.incubator.apache.org Received: (qmail 16142 invoked by uid 99); 7 Feb 2018 22:33:07 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Feb 2018 22:33:07 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id DE4F682314; Wed, 7 Feb 2018 22:33:06 +0000 (UTC) Date: Wed, 07 Feb 2018 22:33:06 +0000 To: "commits@superset.apache.org" Subject: [incubator-superset] branch master updated: [line] improve feature (#4363) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <151804278675.22465.1662878264942202948@gitbox.apache.org> From: maximebeauchemin@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-superset X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 90d9616f2bb250f6e30fed6a0047f092f5e14f81 X-Git-Newrev: c4eba9e4673ac44299d5639bf20e712486aaa023 X-Git-Rev: c4eba9e4673ac44299d5639bf20e712486aaa023 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated 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 c4eba9e [line] improve feature (#4363) c4eba9e is described below commit c4eba9e4673ac44299d5639bf20e712486aaa023 Author: Maxime Beauchemin AuthorDate: Wed Feb 7 14:33:04 2018 -0800 [line] improve feature (#4363) Require Since and Until parameter as they are needed to time shift --- superset/viz.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/superset/viz.py b/superset/viz.py index c500276..ebd0c78 100644 --- a/superset/viz.py +++ b/superset/viz.py @@ -1073,6 +1073,11 @@ class NVD3TimeSeriesViz(NVD3Viz): delta = utils.parse_human_timedelta(time_compare) query_object['inner_from_dttm'] = query_object['from_dttm'] query_object['inner_to_dttm'] = query_object['to_dttm'] + + if not query_object['from_dttm'] or not query_object['to_dttm']: + raise Exception(_( + '`Since` and `Until` time bounds should be specified ' + 'when using the `Time Shift` feature.')) query_object['from_dttm'] -= delta query_object['to_dttm'] -= delta -- To stop receiving notification emails like this one, please contact maximebeauchemin@apache.org.