rawwar commented on code in PR #43508:
URL: https://github.com/apache/airflow/pull/43508#discussion_r1833527260
##########
airflow/api_fastapi/core_api/routes/public/dag_run.py:
##########
@@ -121,22 +121,28 @@ async def patch_dag_run_state(
raise HTTPException(status.HTTP_404_NOT_FOUND, f"Dag with id {dag_id}
was not found")
if update_mask:
- if update_mask != ["state"]:
- raise HTTPException(
- status.HTTP_400_BAD_REQUEST, "Only `state` field can be
updated through the REST API"
- )
+ data = patch_body.model_dump(include=set(update_mask))
else:
- update_mask = ["state"]
+ data = patch_body.model_dump(exclude_unset=True)
Review Comment:
Updated it
--
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]