michellethomas commented on issue #5100: Fix form data issue switching viz types
URL: 
https://github.com/apache/incubator-superset/pull/5100#issuecomment-401466199
 
 
   After our conversation I'm deprecating the undocumented feature for using 
overrides in explore_json. Explore_json should take in the full form_data and 
if someone in the future wants that feature they should add another endpoint 
that's similar to explore_json but calls `get_form_data(use_slice_data=True)`.
   
   I tried to only use the request.url when deciding whether to include the 
slice params but that breaks saving because the url is `/explore/` but 
`use_slice_data` should be False. This didn't break the tests so I added an 
additional check to make sure `assert slc.viz.form_data == form_data`.
   
   I updated the tests so they don't use overrides with explore_json calls, and 
instead make calls with full form_data. In your change Max, slc.form_data adds 
datasource to the form_data before returning it, but slc.viz.form_data does not 
contain datasource because we just set it to the slice params. So also changed 
tests to use slc.form_data.

----------------------------------------------------------------
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