You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/01/14 12:18:54 UTC

[GitHub] [airflow] ephraimbuddy commented on a change in pull request #20871: Fix failing main

ephraimbuddy commented on a change in pull request #20871:
URL: https://github.com/apache/airflow/pull/20871#discussion_r784799101



##########
File path: airflow/api_connexion/endpoints/task_instance_endpoint.py
##########
@@ -326,7 +326,12 @@ def post_set_task_instances_state(*, dag_id: str, session: Session = NEW_SESSION
             detail=f"Task instance not found for task {task_id!r} on execution_date {execution_date}"
         )
 
-    if run_id and not session.query(TI).get({'task_id': task_id, 'dag_id': dag_id, 'run_id': run_id}):
+    if run_id and (
+        session.query(TI)
+        .filter(TI.task_id == task_id, TI.dag_id == dag_id, TI.run_id == run_id)
+        .one_or_none()
+        is None
+    ):

Review comment:
       Need to pull to fix static checks if any...pulling




-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org