From 1eb9975dd63f319a307996f84fbf148d51e36b52 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Sat, 6 Apr 2019 20:05:33 -0400 Subject: [PATCH] Fix server side AJAX template rendering Signed-off-by: Roberto Rosario --- mayan/apps/common/classes.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mayan/apps/common/classes.py b/mayan/apps/common/classes.py index 1d1db0b597..6f40916148 100644 --- a/mayan/apps/common/classes.py +++ b/mayan/apps/common/classes.py @@ -305,10 +305,10 @@ class Template(object): context=context, ).render() - content = result.rendered_content.replace('\n', '') - - self.html = content - self.hex_hash = hashlib.sha256(content).hexdigest() + # Calculate the hash of the bytes version but return the unicode + # version + self.html = result.rendered_content.replace('\n', '') + self.hex_hash = hashlib.sha256(result.content).hexdigest() return self