MongoEngine / django-mongoengine

django mongoengine integration
Other
749 stars 208 forks source link

Admin pagination seems to be off by one. #169

Closed colinkingswood closed 1 year ago

colinkingswood commented 2 years ago

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

last-partizan commented 2 years ago

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 commented 1 year ago

Fixed.