diff --git a/gallery/views/image.py b/gallery/views/image.py index ae5147c..0e992bf 100644 --- a/gallery/views/image.py +++ b/gallery/views/image.py @@ -78,7 +78,7 @@ def image(image_id): # Slice the list of IDs into chunks of the limit for j in total_images[i * limit : (i + 1) * limit]: # Is our image in this chunk? - if image_id < j[-1]: + if not image_id > j[-1]: return_page = i + 1 break