uranusjr commented on code in PR #24399:
URL: https://github.com/apache/airflow/pull/24399#discussion_r903385891
##########
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:
`get_mapping_from_request()` is called twice in this function, they can be
merged.
--
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]