Commit a56c5f68 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

branding: Handle non dict context in render_to_string

parent d65172d4
......@@ -22,6 +22,9 @@ def brand_message(msg, **extra_args):
def render_to_string(template_name, dictionary=None, context_instance=None):
if not dictionary:
dictionary = {}
newdict = get_branding_dict("BRANDING")
newdict.update(dictionary)
if isinstance(dictionary, dict):
newdict = get_branding_dict("BRANDING")
newdict.update(dictionary)
else:
newdict = dictionary
return django_render_to_string(template_name, newdict, context_instance)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment