jason810496 commented on code in PR #55260:
URL: https://github.com/apache/airflow/pull/55260#discussion_r2323784373
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/hitl.py:
##########
@@ -226,13 +179,15 @@ def get_hitl_detail(
map_index: int = -1,
) -> HITLDetail:
"""Get a Human-in-the-loop detail of a specific task instance."""
- return _get_hitl_detail(
+ task_instance = _get_task_instance_with_hitl_detail(
dag_id=dag_id,
dag_run_id=dag_run_id,
task_id=task_id,
session=session,
map_index=map_index,
)
+ hitl_detail_model = task_instance.hitl_detail
+ return HITLDetail.model_validate(hitl_detail_model)
Review Comment:
If I remember correctly, we can directly return the `hitl_detail_model` and
FastAPI will handle rest of the serialization.
--
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]