aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/models.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-07-07 08:22:12 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-07-07 08:22:12 -0500
commite6fd112d429d1fcc5994ff19c61bd67367a33ce5 (patch)
tree02ed9e3f02eb7d78d605553215ac79505134162f /mediagoblin/db/models.py
parentfe80cb06c499723a4e557c10b993b754f4b60456 (diff)
downloadmediagoblin-e6fd112d429d1fcc5994ff19c61bd67367a33ce5.tar.lz
mediagoblin-e6fd112d429d1fcc5994ff19c61bd67367a33ce5.tar.xz
mediagoblin-e6fd112d429d1fcc5994ff19c61bd67367a33ce5.zip
This should actually fix the next and previous buttons now. Sorry I borked the merge!
Diffstat (limited to 'mediagoblin/db/models.py')
-rw-r--r--mediagoblin/db/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py
index 2b7933a4..279cb9f2 100644
--- a/mediagoblin/db/models.py
+++ b/mediagoblin/db/models.py
@@ -147,7 +147,7 @@ class MediaEntry(Document):
"""
Provide a url to the previous entry from this user, if there is one
"""
- cursor = self.db.MediaEntry.find({'_id' : {"$lt": self['_id']},
+ cursor = self.db.MediaEntry.find({'_id' : {"$gt": self['_id']},
'uploader': self['uploader'],
'state': 'processed'}).sort(
'_id', ASCENDING).limit(1)
@@ -160,7 +160,7 @@ class MediaEntry(Document):
"""
Provide a url to the next entry from this user, if there is one
"""
- cursor = self.db.MediaEntry.find({'_id' : {"$gt": self['_id']},
+ cursor = self.db.MediaEntry.find({'_id' : {"$lt": self['_id']},
'uploader': self['uploader'],
'state': 'processed'}).sort(
'_id', DESCENDING).limit(1)