mistercrunch closed pull request #4338: Fix the bug of charts/slices cannot be 
filtered by datasource name.
URL: https://github.com/apache/incubator-superset/pull/4338

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/views/core.py b/superset/views/core.py
index 1b9739fa37..0419c042f8 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -1189,7 +1189,8 @@ def explore(self, datasource_type, datasource_id):
-                datasource_type)
+                datasource_type,
+                datasource.name)
         form_data['datasource'] = str(datasource_id) + '__' + datasource_type
@@ -1255,7 +1256,7 @@ def filter(self, datasource_type, datasource_id, column):
     def save_or_overwrite_slice(
             self, args, slc, slice_add_perm, slice_overwrite_perm, 
-            datasource_id, datasource_type):
+            datasource_id, datasource_type, datasource_name):
         """Save or overwrite a slice"""
         slice_name = args.get('slice_name')
         action = args.get('action')
@@ -1267,7 +1268,7 @@ def save_or_overwrite_slice(
             slc = models.Slice(owners=[g.user] if g.user else [])
         slc.params = json.dumps(form_data)
-        slc.datasource_name = args.get('datasource_name')
+        slc.datasource_name = datasource_name
         slc.viz_type = form_data['viz_type']
         slc.datasource_type = datasource_type
         slc.datasource_id = datasource_id


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:

With regards,
Apache Git Services

Reply via email to