From 39af5d1f1cb7a11fb57d5bd460cdad4a69bdb854 Mon Sep 17 00:00:00 2001 From: Aditya Hase Date: Wed, 9 Aug 2017 15:16:10 +0530 Subject: [PATCH] Convert method name to string instead of encoding --- frappe/model/document.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/model/document.py b/frappe/model/document.py index 3e8db22802..e46b36880d 100644 --- a/frappe/model/document.py +++ b/frappe/model/document.py @@ -662,7 +662,7 @@ class Document(BaseDocument): # hack! to run hooks even if method does not exist fn = lambda self, *args, **kwargs: None - fn.__name__ = method.encode("utf-8") + fn.__name__ = str(method) out = Document.hook(fn)(self, *args, **kwargs) self.run_email_alerts(method)