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


##########
airflow/api_connexion/endpoints/pool_endpoint.py:
##########
@@ -87,7 +88,10 @@ def patch_pool(
     """Update a pool"""
     # Only slots can be modified in 'default_pool'
     try:
-        if pool_name == Pool.DEFAULT_POOL_NAME and request.json["name"] != 
Pool.DEFAULT_POOL_NAME:
+        if (
+            pool_name == Pool.DEFAULT_POOL_NAME
+            and get_mapping_from_request()["name"] != Pool.DEFAULT_POOL_NAME

Review Comment:
   BTW. The *reall* reason for this hack-ishnes is Flask choice of getting 
current request by `from flask import request` . This is the root of all evil 
here :)



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