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

ephraimanierobi 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 d59b0533e1 Fix task.branch error caused by incorrect initial parameter 
(#31265)
d59b0533e1 is described below

commit d59b0533e18c7cf0ff17f8af50731d700a2e4b4d
Author: YenchenLiu <[email protected]>
AuthorDate: Sat May 13 22:21:56 2023 +1000

    Fix task.branch error caused by incorrect initial parameter (#31265)
---
 docs/apache-airflow/core-concepts/dags.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/apache-airflow/core-concepts/dags.rst 
b/docs/apache-airflow/core-concepts/dags.rst
index c959fd9a30..e3356c65b9 100644
--- a/docs/apache-airflow/core-concepts/dags.rst
+++ b/docs/apache-airflow/core-concepts/dags.rst
@@ -328,7 +328,7 @@ The ``@task.branch`` can also be used with XComs allowing 
branching context to d
 .. code-block:: python
 
     @task.branch(task_id="branch_task")
-    def branch_func(ti):
+    def branch_func(ti=None):
         xcom_value = int(ti.xcom_pull(task_ids="start_task"))
         if xcom_value >= 5:
             return "continue_task"

Reply via email to