From c7d6a5553e1889f8d410e67078f1e84e8cba3716 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 7 Feb 2014 15:53:31 +0530 Subject: [PATCH 1/2] Minor fix in nestedset --- webnotes/utils/nestedset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webnotes/utils/nestedset.py b/webnotes/utils/nestedset.py index be82fff496..662f4cf077 100644 --- a/webnotes/utils/nestedset.py +++ b/webnotes/utils/nestedset.py @@ -189,7 +189,7 @@ class DocTypeNestedSet(object): self.doc.fields[self.nsm_parent_field] = "" update_nsm(self) - def before_rename(self, newdn, olddn, merge=False, group_fname="is_group"): + def before_rename(self, olddn, newdn, merge=False, group_fname="is_group"): if merge: is_group = webnotes.conn.get_value(self.doc.doctype, newdn, group_fname) if self.doc.fields[group_fname] != is_group: From 4da315c4976bdf4da17036d16c9cb45c8831270a Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 7 Feb 2014 15:54:06 +0530 Subject: [PATCH 2/2] Set subject while pulling email if subject not specified --- webnotes/utils/email_lib/receive.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webnotes/utils/email_lib/receive.py b/webnotes/utils/email_lib/receive.py index 57991bfbb5..3f0559630c 100644 --- a/webnotes/utils/email_lib/receive.py +++ b/webnotes/utils/email_lib/receive.py @@ -52,7 +52,10 @@ class IncomingMail: else: # assume that the encoding is utf-8 self.subject = self.subject.decode("utf-8") - + + if not self.subject: + self.subject = "No Subject" + def set_content_and_type(self): self.content, self.content_type = '[Blank Email]', 'text/plain' if self.text_content: