From c3acb1753e7d4de815180cf9a5ac7846e6afc716 Mon Sep 17 00:00:00 2001 From: Oliver Date: Mon, 4 Dec 2023 15:15:39 +1100 Subject: [PATCH] Ensure template string is cached (#6027) --- InvenTree/part/helpers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/InvenTree/part/helpers.py b/InvenTree/part/helpers.py index a237a42843..ca1150b2ee 100644 --- a/InvenTree/part/helpers.py +++ b/InvenTree/part/helpers.py @@ -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='{{',