[svn r1606] Problem with zero bookmarks. Still some problem on keywords count. xbelweb
authorfabien
Fri, 24 Oct 2003 17:51:57 -0400
branchxbelweb
changeset 49 57932e991854
parent 48 9cde0ea6f411
child 50 5275135955c0
[svn r1606] Problem with zero bookmarks. Still some problem on keywords count.
lib/folders.py
--- a/lib/folders.py	Fri Oct 24 17:24:19 2003 -0400
+++ b/lib/folders.py	Fri Oct 24 17:51:57 2003 -0400
@@ -53,6 +53,7 @@
 		keywords.append(keyword)
     for child in children:
     	child['count'] = len(db.select_bookmarks(selection + [child['keyword']]))
-    bookmarks = db.get_bookmarks(map(lambda bk: bk[0], bookmarks))
-    bookmarks = map(lambda bk: bk.dict(), bookmarks)
+    if len(bookmarks) <> 0:
+   	bookmarks = db.get_bookmarks(map(lambda bk: bk[0], bookmarks))
+    	bookmarks = map(lambda bk: bk.dict(), bookmarks)
     output(prefs, parents.pop(), parents, children, bookmarks, keywords)