Skip to content

fix clamp_page_limit to use .min instead of .max #223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

SamiAlHassan
Copy link

Description

Limiting the page limit to a maximum permitted value is the purpose of the helper function clamp_page_limit but the function always returns the value MAX_PAGE_LIMIT when .max(MAX_PAGE_LIMIT) is used. With this PR .max is changed to .min so that the page limit is the smaller of MAX_PAGE_LIMIT and the default limit which is the purpose of the function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant