Closed colinkingswood closed 1 year 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
+ 1
self.page_num
https://github.com/MongoEngine/django-mongoengine/blob/c6d165b2121adcb42d72f71a3419ff821bd46f60/django_mongoengine/mongo_admin/views.py#L49
Hi
Would you like add a test and a fix for this? This seems like a easy case, but i have no extra time.
Fixed.
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 theself.page_num
https://github.com/MongoEngine/django-mongoengine/blob/c6d165b2121adcb42d72f71a3419ff821bd46f60/django_mongoengine/mongo_admin/views.py#L49