From 13bb415187db601de7fa178595a7450a2c958a72 Mon Sep 17 00:00:00 2001 From: Alessandro Pasotti Date: Thu, 15 Jun 2017 08:00:13 +0200 Subject: [PATCH] Fix error in context: it must be a dict --- mayan/apps/common/templatetags/common_tags.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mayan/apps/common/templatetags/common_tags.py b/mayan/apps/common/templatetags/common_tags.py index 70881111c9..5e60124141 100644 --- a/mayan/apps/common/templatetags/common_tags.py +++ b/mayan/apps/common/templatetags/common_tags.py @@ -82,10 +82,9 @@ def render_subtemplate(context, template_name, template_context): Renders the specified template with the mixed parent and subtemplate contexts """ - - new_context = Context(context) + new_context = Context(context.flatten()) new_context.update(Context(template_context)) - return get_template(template_name).render(new_context) + return get_template(template_name).render(new_context.flatten()) @register.assignment_tag