From commits-return-1021-archive-asf-public=cust-asf.ponee.io@superset.incubator.apache.org Thu May 24 00:54:18 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 25AA0180645 for ; Thu, 24 May 2018 00:54:17 +0200 (CEST) Received: (qmail 9931 invoked by uid 500); 23 May 2018 22:54:17 -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 9922 invoked by uid 99); 23 May 2018 22:54:17 -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, 23 May 2018 22:54:17 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id A94B282A39; Wed, 23 May 2018 22:54:16 +0000 (UTC) Date: Wed, 23 May 2018 22:54:16 +0000 To: "commits@superset.apache.org" Subject: [incubator-superset] branch dashboard-builder updated: [dashboard v2] check for default_filters before json_loads-ing them (#5064) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <152711605651.16257.9658633353147107560@gitbox.apache.org> From: ccwilliams@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: incubator-superset X-Git-Refname: refs/heads/dashboard-builder X-Git-Reftype: branch X-Git-Oldrev: 82a0e3ee64e825e30bb71ae758f4e2dd3571b989 X-Git-Newrev: 5488d55f96832f7f06bbd4cbc182b0bf2ccd142e X-Git-Rev: 5488d55f96832f7f06bbd4cbc182b0bf2ccd142e 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. ccwilliams pushed a commit to branch dashboard-builder in repository https://gitbox.apache.org/repos/asf/incubator-superset.git The following commit(s) were added to refs/heads/dashboard-builder by this push: new 5488d55 [dashboard v2] check for default_filters before json_loads-ing them (#5064) 5488d55 is described below commit 5488d55f96832f7f06bbd4cbc182b0bf2ccd142e Author: Chris Williams AuthorDate: Wed May 23 15:54:12 2018 -0700 [dashboard v2] check for default_filters before json_loads-ing them (#5064) [dashboard v2] check for default_filters before json-loads-ing them --- superset/models/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset/models/core.py b/superset/models/core.py index 95ee6dd..4f1c331 100644 --- a/superset/models/core.py +++ b/superset/models/core.py @@ -348,7 +348,7 @@ class Dashboard(Model, AuditMixinNullable, ImportMixin): json_metadata = json.loads(self.json_metadata) default_filters = json_metadata.get('default_filters') # make sure default_filters is not empty - if json.loads(default_filters): + if default_filters and json.loads(default_filters): filters = parse.quote(default_filters.encode('utf8')) return '/superset/dashboard/{}/?preselect_filters={}'.format( self.slug or self.id, filters) -- To stop receiving notification emails like this one, please contact ccwilliams@apache.org.