Skip to content

Commit

Permalink
[dashboard v2] check for default_filters before json_loads-ing them (#…
Browse files Browse the repository at this point in the history
…5064)

[dashboard v2] check for default_filters before json-loads-ing them
  • Loading branch information
williaster authored May 23, 2018
1 parent 82a0e3e commit 5488d55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion superset/models/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5488d55

Please sign in to comment.