doclist.py: catch all if docname does match doc (? unidentified issue)

This commit is contained in:
Rushabh Mehta 2011-08-12 11:29:30 +05:30
parent 36e7aeb2a5
commit dc1d406966
2 changed files with 2 additions and 1 deletions

View file

@ -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:

View file

@ -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, '')