You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/05/23 22:54:14 UTC

[GitHub] williaster closed pull request #5064: [dashboard v2] check for default_filters before json-loads-ing them

williaster closed pull request #5064: [dashboard v2] check for default_filters before json-loads-ing them
URL: https://github.com/apache/incubator-superset/pull/5064
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/superset/models/core.py b/superset/models/core.py
index 95ee6dd90a..4f1c33180f 100644
--- a/superset/models/core.py
+++ b/superset/models/core.py
@@ -348,7 +348,7 @@ def url(self):
             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)


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org