ashb commented on code in PR #44907:
URL: https://github.com/apache/airflow/pull/44907#discussion_r1886669634


##########
airflow/api_fastapi/execution_api/routes/task_instances.py:
##########
@@ -147,7 +149,26 @@ def ti_update_state(
             next_kwargs=ti_patch_payload.trigger_kwargs,
             trigger_timeout=timeout,
         )
+    elif isinstance(ti_patch_payload, TIRescheduleStatePayload):
+        task_instance = session.scalar(select(TI).where(TI.id == ti_id_str))

Review Comment:
   Sqla has a method for getting rows my their primary key -- we should use 
that here.
   ```suggestion
           task_instance = session.get(TI, (ti_id_str,))
   ```



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