This should actually fix the next and previous buttons now. Sorry I borked the merge!

This commit is contained in:
Christopher Allan Webber 2011-07-07 08:22:12 -05:00
parent fe80cb06c4
commit e6fd112d42

View File

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