uranusjr commented on a change in pull request #22218:
URL: https://github.com/apache/airflow/pull/22218#discussion_r825405109
##########
File path: airflow/models/abstractoperator.py
##########
@@ -115,7 +115,7 @@ def get_template_env(self) -> "jinja2.Environment":
dag = self.get_dag()
if dag:
- return dag.get_template_env()
+ return dag.get_template_env(force_string=True)
Review comment:
I don’t think this is correct though. This function is also used when
the task is being executed (in `render_template_fields`), and in _that_
situation we want to use `NativeEnvironment` if `render_template_as_native_obj`
is True. so this `get_template_env` also need to have a `force_string`
argument, and only `get_email_subject_content` should set it to True.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]