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

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


The following commit(s) were added to refs/heads/master by this push:
     new 5e1c33a  Fix docs on creating CustomOperator (#8678)
5e1c33a is described below

commit 5e1c33a1baf0725eeb695a96b29ddd9585df51e4
Author: Jonny Fuller <[email protected]>
AuthorDate: Sat May 9 20:33:45 2020 -0400

    Fix docs on creating CustomOperator (#8678)
---
 docs/howto/custom-operator.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/docs/howto/custom-operator.rst b/docs/howto/custom-operator.rst
index 0951b18..6cd8510 100644
--- a/docs/howto/custom-operator.rst
+++ b/docs/howto/custom-operator.rst
@@ -162,7 +162,7 @@ the operator.
                 self.name = name
 
             def execute(self, context):
-                message = "Hello from {}".format(name)
+                message = "Hello from {}".format(self.name)
                 print(message)
                 return message
 
@@ -171,9 +171,9 @@ You can use the template as follows:
 .. code:: python
 
         with dag:
-            hello_task = HelloOperator(task_id='task_id_1', dag=dag, name='{{ 
task_id }}')
+            hello_task = HelloOperator(task_id='task_id_1', dag=dag, name='{{ 
task_instance.task_id }}')
 
-In this example, Jinja looks for the ``name`` parameter and substitutes ``{{ 
task_id }}`` with
+In this example, Jinja looks for the ``name`` parameter and substitutes ``{{ 
task_instance.task_id }}`` with
 ``task_id_1``.
 
 

Reply via email to