superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From michel...@apache.org
Subject [incubator-superset] 01/04: [warm] Enforcing consistent form-data (#6531)
Date Tue, 18 Dec 2018 18:52:45 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit b0f464d7313f93d30b3cdc9a85e4bea5567134e0
Author: John Bodley <4567245+john-bodley@users.noreply.github.com>
AuthorDate: Fri Dec 14 14:00:38 2018 +1300

    [warm] Enforcing consistent form-data (#6531)
    
    (cherry picked from commit 1fba6f7a174a275cd8ed33367fe4d3932301b9ea)
---
 superset/views/core.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/superset/views/core.py b/superset/views/core.py
index 7faa1e2..f9eb299 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -2050,7 +2050,13 @@ class Superset(BaseSupersetView):
 
         for slc in slices:
             try:
-                obj = slc.get_viz(force=True)
+                form_data = self.get_form_data(slc.id, use_slice_data=True)[0]
+                obj = self.get_viz(
+                    datasource_type=slc.datasource.type,
+                    datasource_id=slc.datasource.id,
+                    form_data=form_data,
+                    force=True,
+                )
                 obj.get_json()
             except Exception as e:
                 return json_error_response(utils.error_msg_from_exception(e))


Mime
View raw message