john-bodley commented on a change in pull request #10197:
URL: 
https://github.com/apache/incubator-superset/pull/10197#discussion_r447417538



##########
File path: superset/utils/log.py
##########
@@ -36,31 +36,32 @@ def log(
         pass
 
     def log_this(self, f: Callable[..., Any]) -> Callable[..., Any]:
+        from superset.views.core import get_form_data
+
         @functools.wraps(f)
         def wrapper(*args: Any, **kwargs: Any) -> Any:
             user_id = None
             if g.user:
                 user_id = g.user.get_id()
-            form_data = request.form.to_dict() or {}
+            payload = request.form.to_dict() or {}

Review comment:
       The term `payload` seems more accurate than `form_data`.

##########
File path: superset/utils/log.py
##########
@@ -36,31 +36,32 @@ def log(
         pass
 
     def log_this(self, f: Callable[..., Any]) -> Callable[..., Any]:
+        from superset.views.core import get_form_data
+
         @functools.wraps(f)
         def wrapper(*args: Any, **kwargs: Any) -> Any:
             user_id = None
             if g.user:
                 user_id = g.user.get_id()
-            form_data = request.form.to_dict() or {}
+            payload = request.form.to_dict() or {}
 
             # request parameters can overwrite post body

Review comment:
       I'm not sure if this comment (and the associated logic is relevant) as 
I'm unclear if this hold true only for payloads containing `form-data`. 




----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to