django-mongoengine icon indicating copy to clipboard operation
django-mongoengine copied to clipboard

Admin pagination seems to be off by one.

Open colinkingswood opened this issue 3 years ago • 1 comments

I have tried creating an admin interface around an existing database, but the pagination seems of by one. It's missing the first page, and the last page gives an error when selected. I think it is the + 1 added to the self.page_num

https://github.com/MongoEngine/django-mongoengine/blob/c6d165b2121adcb42d72f71a3419ff821bd46f60/django_mongoengine/mongo_admin/views.py#L49

colinkingswood avatar Jun 13 '22 07:06 colinkingswood

Hi

Would you like add a test and a fix for this? This seems like a easy case, but i have no extra time.

last-partizan avatar Jun 14 '22 10:06 last-partizan

Fixed.

last-partizan avatar Aug 18 '23 11:08 last-partizan