john-bodley opened a new pull request #10197:
URL: https://github.com/apache/incubator-superset/pull/10197


   ### SUMMARY
   
   The `log_this` method logs the payload associated with the request however 
the existing logic doesn't accurately reflect how the `form_data` field is 
handled, i.e., it tries to fetch the payload from `request.form` (note I'm 
unsure why we're not using the `application/json` content type which uses 
`request.json`) and then override the payload with the request parameters. 
   
   This approach seems incorrect when the form-data is encoded as a JSON object 
within the body or request parameters via the `form_data` key meaning the 
resulting payload is an override as opposed to merge. The solution here (and I 
believe the intent of the method) is to leverage the `get_form_data` method 
(when relevant) which performs a similar merge on the JSON payload associated 
with the `form_data` key as opposed to the parent dictionary. 
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TEST PLAN
   
   CI.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to