diff --git a/cgi-bin/webnotes/model/doclist.py b/cgi-bin/webnotes/model/doclist.py index ee156d6c23..c8df02660a 100644 --- a/cgi-bin/webnotes/model/doclist.py +++ b/cgi-bin/webnotes/model/doclist.py @@ -62,6 +62,7 @@ class DocList: self.doc, self.children = self.docs[0], self.docs[1:] else: + self.doc = None self.children = [] for d in self.docs: if d.name == docname: diff --git a/cgi-bin/webnotes/profile.py b/cgi-bin/webnotes/profile.py index 3fe1eec59d..72b5901c42 100644 --- a/cgi-bin/webnotes/profile.py +++ b/cgi-bin/webnotes/profile.py @@ -183,7 +183,7 @@ class Profile: if not (dt in ['Print Format', 'Start Page', 'Event', 'ToDo Item', 'Search Criteria']) and not webnotes.is_testing and not (dt in child_tables): r = cstr(webnotes.conn.sql("select recent_documents from tabProfile where name=%s", self.name)[0][0] or '') - new_str = cstr(dt)+'~~~'+cstr(dn) + '\n' + new_str = dt+'~~~'+dn + '\n' if new_str in r: r = r.replace(new_str, '')