From f85b96121aa267dade4391b3eeb0ffbf64b32f12 Mon Sep 17 00:00:00 2001 From: Chris Beaven Date: Sat, 27 Aug 2011 04:55:02 +0000 Subject: [PATCH] Fix a small thread safety issue in ExtendsNode. No tests, but Malcolm said that's ok, honest. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16700 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/template/loader_tags.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/django/template/loader_tags.py b/django/template/loader_tags.py index 8f951edee9..b642765341 100644 --- a/django/template/loader_tags.py +++ b/django/template/loader_tags.py @@ -88,8 +88,9 @@ class ExtendsNode(Node): def get_parent(self, context): if self.parent_name_expr: - self.parent_name = self.parent_name_expr.resolve(context) - parent = self.parent_name + parent = self.parent_name_expr.resolve(context) + else: + parent = self.parent_name if not parent: error_msg = "Invalid template name in 'extends' tag: %r." % parent if self.parent_name_expr: