airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davy...@apache.org
Subject incubator-airflow git commit: [AIRFLOW-1574] add 'to' attribute to templated vars of email operator
Date Thu, 07 Sep 2017 18:54:03 GMT
Repository: incubator-airflow
Updated Branches:
  refs/heads/master 8f1ec4dee -> 2d4069448


[AIRFLOW-1574] add 'to' attribute to templated vars of email operator

The to field may sometimes want to be to be
template-able when you have a DAG that is using
XCOM to find the user to send the information to
(i.e. we have a form that a user submits and based
on the ldap user we send this specific user the
information). It's a rather easy fix to add the
'to' user to the template-able options.

Closes #2577 from Acehaidrey/AIRFLOW-1574


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/2d406944
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/2d406944
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/2d406944

Branch: refs/heads/master
Commit: 2d40694482df7c9c1c02a61e11d51bedb9034a93
Parents: 8f1ec4d
Author: Ace Haidrey <ahaidrey@pandora.com>
Authored: Thu Sep 7 11:53:16 2017 -0700
Committer: Dan Davydov <dan.davydov@airbnb.com>
Committed: Thu Sep 7 11:53:20 2017 -0700

----------------------------------------------------------------------
 airflow/operators/email_operator.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/2d406944/airflow/operators/email_operator.py
----------------------------------------------------------------------
diff --git a/airflow/operators/email_operator.py b/airflow/operators/email_operator.py
index 5167a7a..6eaae95 100644
--- a/airflow/operators/email_operator.py
+++ b/airflow/operators/email_operator.py
@@ -36,7 +36,7 @@ class EmailOperator(BaseOperator):
     :type bcc: list or string (comma or semicolon delimited)
     """
 
-    template_fields = ('subject', 'html_content')
+    template_fields = ('to', 'subject', 'html_content')
     template_ext = ('.html',)
     ui_color = '#e6faf9'
 


Mime
View raw message