This is an automated email from the ASF dual-hosted git repository.
turbaszek 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 3cddc11 Updated template_fields_rendereds for PostgresOperator and
SimpleHttpOperator (#11555)
3cddc11 is described below
commit 3cddc11821ff8f9ed0811384c0643f756a2b3dfa
Author: Michal Niemiec <[email protected]>
AuthorDate: Fri Oct 16 13:12:06 2020 +0200
Updated template_fields_rendereds for PostgresOperator and
SimpleHttpOperator (#11555)
Co-authored-by: Michal Niemiec/IT/CREDITSAFE <[email protected]>
---
airflow/providers/http/operators/http.py | 1 +
airflow/providers/postgres/operators/postgres.py | 1 +
2 files changed, 2 insertions(+)
diff --git a/airflow/providers/http/operators/http.py
b/airflow/providers/http/operators/http.py
index 8457b46..af32fca 100644
--- a/airflow/providers/http/operators/http.py
+++ b/airflow/providers/http/operators/http.py
@@ -64,6 +64,7 @@ class SimpleHttpOperator(BaseOperator):
'data',
'headers',
]
+ template_fields_renderers = {'headers': 'json', 'data': 'py'}
template_ext = ()
ui_color = '#f4a460'
diff --git a/airflow/providers/postgres/operators/postgres.py
b/airflow/providers/postgres/operators/postgres.py
index 88f7662..2af921e 100644
--- a/airflow/providers/postgres/operators/postgres.py
+++ b/airflow/providers/postgres/operators/postgres.py
@@ -42,6 +42,7 @@ class PostgresOperator(BaseOperator):
"""
template_fields = ('sql',)
+ template_fields_renderers = {'sql': 'sql'}
template_ext = ('.sql',)
ui_color = '#ededed'