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

Pagination breaks previous limits

Open ripperdoc opened this issue 7 years ago • 1 comments

When you create a pagination, it doesn't take into account any .limit() or .skip() that has already been done to the QuerySet being inputted. For example, if I do articles.objects().limit(3), paginating t for 10 items per page would remove the limit of max 3 articles.

I would consider this a bug as it makes it impossible to modify the query size in several steps.

ripperdoc avatar May 03 '17 21:05 ripperdoc

@ripperdoc it is strange to ask to check this with master, after 5 years issue. But who knows :) I just merged https://github.com/MongoEngine/flask-mongoengine/pull/422 it is on connected topic, and maybe fix your issue too. I do not have a chance to make a dedicated test for it, yet. As I am very limited in time, and want to bring a little life to this repo.

insspb avatar Jul 01 '22 21:07 insspb