This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new c06a6e58b9 Remove duplicate if (#38327)
c06a6e58b9 is described below

commit c06a6e58b9b3d19b2053604e19b245419cc5d46b
Author: Vincent <[email protected]>
AuthorDate: Wed Mar 20 11:42:31 2024 -0400

    Remove duplicate if (#38327)
---
 airflow/models/taskinstance.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/airflow/models/taskinstance.py b/airflow/models/taskinstance.py
index 0d27404292..b16fa633a6 100644
--- a/airflow/models/taskinstance.py
+++ b/airflow/models/taskinstance.py
@@ -411,10 +411,9 @@ def _execute_task(task_instance: TaskInstance | 
TaskInstancePydantic, context: C
     execute_callable_kwargs: dict[str, Any] = {}
     execute_callable: Callable
     if task_instance.next_method:
-        if task_instance.next_method:
-            execute_callable = task_to_execute.resume_execution
-            execute_callable_kwargs["next_method"] = task_instance.next_method
-            execute_callable_kwargs["next_kwargs"] = task_instance.next_kwargs
+        execute_callable = task_to_execute.resume_execution
+        execute_callable_kwargs["next_method"] = task_instance.next_method
+        execute_callable_kwargs["next_kwargs"] = task_instance.next_kwargs
     else:
         execute_callable = task_to_execute.execute
 

Reply via email to