You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/09/18 09:10:14 UTC

[GitHub] [airflow] ashb commented on a change in pull request #6064: [AIRFLOW-5444] Fix action_logging so that request.form for POST is logged

ashb commented on a change in pull request #6064: [AIRFLOW-5444] Fix action_logging so that request.form for POST is logged
URL: https://github.com/apache/airflow/pull/6064#discussion_r325564568
 
 

 ##########
 File path: airflow/www/decorators.py
 ##########
 @@ -39,17 +39,19 @@ def wrapper(*args, **kwargs):
             else:
                 user = g.user.username
 
+            params = request.form if request.method == 'POST' else request.args
+
             log = Log(
                 event=f.__name__,
                 task_instance=None,
                 owner=user,
-                extra=str(list(request.args.items())),
-                task_id=request.args.get('task_id'),
-                dag_id=request.args.get('dag_id'))
+                extra=str(list(params.items())),
 
 Review comment:
   Just use [request.values](https://werkzeug.readthedocs.io/en/0.15.x/wrappers/#werkzeug.wrappers.BaseRequest.values) instead.
   
   ```suggestion
                   extra=str(list(request.values.items())),
   ```

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


With regards,
Apache Git Services