Ensure template string is cached (#6027)

This commit is contained in:
Oliver 2023-12-04 15:15:39 +11:00 committed by GitHub
parent 025cc47b81
commit c3acb1753e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,6 +32,9 @@ def compile_full_name_template(*args, **kwargs):
if template_string == _part_full_name_template_string and _part_full_name_template is not None:
return _part_full_name_template
# Cache the template string
_part_full_name_template_string = template_string
env = Environment(
autoescape=select_autoescape(default_for_string=False, default=False),
variable_start_string='{{',