mirror of
https://github.com/jeffknupp/sandman2.git
synced 2026-04-25 16:45:50 +03:00
[PR #64] [CLOSED] Fix InvalidRequestError when page and limit set #114
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
pull-request
question
refactoring
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/sandman2-jeffknupp#114
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jeffknupp/sandman2/pull/64
Author: @snaplogic-nic
Created: 9/13/2017
Status: ❌ Closed
Base:
master← Head:patch-1📝 Commits (1)
01a7b5bFix InvalidRequestError when page and limit set📊 Changes
1 file changed (+5 additions, -4 deletions)
View changed files
📝
sandman2/service.py(+5 -4)📄 Description
The call to .paginate() includes an order_by in flask_sqlalchemy. When applied after a limit, this fails with sqlalchemy.exc.InvalidRequestError.
This change uses the per_page argument of .paginate() if the page query argument is set, or otherwise just applies the limit last.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.