superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maximebeauche...@apache.org
Subject [incubator-superset] branch master updated: Fix the bug of charts/slices cannot be filtered by datasource name. (#4338)
Date Mon, 05 Feb 2018 07:03:51 GMT
This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new ad21227  Fix the bug of charts/slices cannot be filtered by datasource name. (#4338)
ad21227 is described below

commit ad212272d100eef64a3e6d649f63941f6fe83809
Author: liutgnu <liutgnu@gmail.com>
AuthorDate: Mon Feb 5 15:03:44 2018 +0800

    Fix the bug of charts/slices cannot be filtered by datasource name. (#4338)
---
 superset/views/core.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/superset/views/core.py b/superset/views/core.py
index 1b9739f..0419c04 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -1189,7 +1189,8 @@ class Superset(BaseSupersetView):
                 slice_overwrite_perm,
                 slice_download_perm,
                 datasource_id,
-                datasource_type)
+                datasource_type,
+                datasource.name)
 
         form_data['datasource'] = str(datasource_id) + '__' + datasource_type
 
@@ -1255,7 +1256,7 @@ class Superset(BaseSupersetView):
 
     def save_or_overwrite_slice(
             self, args, slc, slice_add_perm, slice_overwrite_perm, slice_download_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 @@ class Superset(BaseSupersetView):
             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

-- 
To stop receiving notification emails like this one, please contact
maximebeauchemin@apache.org.

Mime
View raw message