mistercrunch commented on a change in pull request #3183: [add] Save filters to 
dashboard
URL: 
https://github.com/apache/incubator-superset/pull/3183#discussion_r132232608
 
 

 ##########
 File path: superset/models/core.py
 ##########
 @@ -322,6 +323,18 @@ def table_names(self):
 
     @property
     def url(self):
+        if self.json_metadata:
+            # add default_filters to the preselect_filters of dashboard
+            json_metadata = json.loads(self.json_metadata)
+            default_filters = json_metadata.get('default_filters')
+            if default_filters:
+                filters = ''
+                if isinstance(default_filters, str):
+                    filters = urllib.quote(default_filters)
+                elif isinstance(default_filters, unicode):
 
 Review comment:
   is this py3 compatible? can we add test coverage?
 
----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to