Merge pull request #3908 from adityahase/fix-method-string
Convert method name to string instead of encoding
This commit is contained in:
commit
6726f7e1b0
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue