Lee-W commented on code in PR #67725:
URL: https://github.com/apache/airflow/pull/67725#discussion_r3480369209


##########
airflow-core/src/airflow/api_fastapi/core_api/routes/ui/partitioned_dag_runs.py:
##########
@@ -463,15 +464,16 @@ def get_pending_partitioned_dag_run(
     total_required = sum(a.required_count for a in assets)
     asset_expression = dag_model.asset_expression if dag_model is not None 
else None
 
-    return PartitionedDagRunDetailResponse(
-        id=partitioned_dag_run.id,
-        dag_id=dag_id,
-        partition_key=partition_key,
-        created_at=partitioned_dag_run.created_at.isoformat() if 
partitioned_dag_run.created_at else None,
-        updated_at=partitioned_dag_run.updated_at.isoformat() if 
partitioned_dag_run.updated_at else None,
-        created_dag_run_id=partitioned_dag_run.created_dag_run_id,
-        assets=assets,
-        total_required=total_required,
-        total_received=total_received,
-        asset_expression=asset_expression,
-    )
+    model_data: dict[str, Any] = {
+        "id": partitioned_dag_run.id,
+        "dag_id": dag_id,
+        "partition_key": partition_key,
+        "created_at": partitioned_dag_run.created_at.isoformat() if 
partitioned_dag_run.created_at else None,
+        "updated_at": partitioned_dag_run.updated_at.isoformat() if 
partitioned_dag_run.updated_at else None,
+        "created_dag_run_id": partitioned_dag_run.created_dag_run_id,
+        "assets": assets,
+        "total_required": total_required,
+        "total_received": total_received,
+        "asset_expression": asset_expression,
+    }
+    return PartitionedDagRunDetailResponse.model_validate(model_data)

Review Comment:
   ok, different style preference. not really crucial so let me resolved my 
suggestions



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