uranusjr commented on code in PR #24399:
URL: https://github.com/apache/airflow/pull/24399#discussion_r901460190


##########
airflow/www/auth.py:
##########
@@ -37,7 +37,11 @@ def decorated(*args, **kwargs):
             appbuilder = current_app.appbuilder
 
             dag_id = (
-                request.args.get("dag_id") or request.form.get("dag_id") or 
(request.json or {}).get("dag_id")
+                request.args.get("dag_id")
+                or request.form.get("dag_id")
+                or request.is_json
+                and request.json.get("dag_id")
+                or None
             )

Review Comment:
   Let’s add parentheses around `request.is_json and 
request.json.get("dag_id")` to make this easier to understand
   
   



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

To unsubscribe, e-mail: [email protected]

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

Reply via email to