You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/06/30 06:53:46 UTC

[GitHub] [incubator-superset] john-bodley commented on a change in pull request #10197: chore: Updating log_this form-data logic

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



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