aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tools/pagination.py
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/tools/pagination.py')
-rw-r--r--mediagoblin/tools/pagination.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mediagoblin/tools/pagination.py b/mediagoblin/tools/pagination.py
index 50e59070..141d91cc 100644
--- a/mediagoblin/tools/pagination.py
+++ b/mediagoblin/tools/pagination.py
@@ -41,7 +41,7 @@ class Pagination(object):
- per_page: number of objects per page
- cursor: db cursor
- jump_to_id: ObjectId, sets the page to the page containing the
- object with _id == jump_to_id.
+ object with id == jump_to_id.
"""
self.page = page
self.per_page = per_page
@@ -53,7 +53,7 @@ class Pagination(object):
cursor = copy.copy(self.cursor)
for (doc, increment) in izip(cursor, count(0)):
- if doc._id == jump_to_id:
+ if doc.id == jump_to_id:
self.page = 1 + int(floor(increment / self.per_page))
self.active_id = jump_to_id