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 <williaster@users.noreply.github.com>
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.
|