john-bodley commented on a change in pull request #5100: Fix form data issue 
switching viz types
URL: 
https://github.com/apache/incubator-superset/pull/5100#discussion_r197246873
 
 

 ##########
 File path: superset/views/core.py
 ##########
 @@ -991,7 +991,9 @@ def get_form_data(self, slice_id=None):
         slice_id = form_data.get('slice_id') or slice_id
         slc = None
 
-        if slice_id:
+        # Include the slice_form_data if form_data contains no datasource
+        datasource_info = form_data.get('datasource') or datasource_id
+        if slice_id and (use_slice_data or not datasource_info):
 
 Review comment:
   `datasource_info` is the name of a local method and thus you probably should 
use a different name. Does `form_data.get('datasource')` contain the datasource 
ID? I'm asking to try to understand why/when the form-data would reference a 
different datasource.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to