--- a/app/soc/views/helper/lists.py Sun Feb 22 11:17:46 2009 +0000
+++ b/app/soc/views/helper/lists.py Sun Feb 22 11:18:19 2009 +0000
@@ -100,7 +100,7 @@
return request.path + link_suffix
-def getListContent(request, params, filter=None, idx=0):
+def getListContent(request, params, filter=None, idx=0, need_content=False):
"""Returns a dict with fields used for rendering lists.
Args:
@@ -138,6 +138,9 @@
# Fetch one more to see if there should be a 'next' link
data = logic.getForFields(filter=filter, limit=limit+1, offset=offset)
+ if need_content and not data:
+ return None
+
more = len(data) > limit
if more: