Skip to content
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

Add pagination to forms endpoint #2319

Merged
merged 6 commits into from
Sep 29, 2022
Merged

Conversation

KipSigei
Copy link
Contributor

@KipSigei KipSigei commented Sep 27, 2022

Changes / Features implemented

  • Enable pagination when listing forms

Steps taken to verify this change does what is intended

  • Tests

Side effects of implementing this change

Before submitting this PR for review, please make sure you have:

  • Included tests
  • Updated documentation

Signed-off-by: Kipchirchir Sigei <[email protected]>
Signed-off-by: Kipchirchir Sigei <[email protected]>
Signed-off-by: Kipchirchir Sigei <[email protected]>
Signed-off-by: Kipchirchir Sigei <[email protected]>
@KipSigei KipSigei changed the title [DNM] Add pagination to forms endpoint Add pagination to forms endpoint Sep 28, 2022
@KipSigei KipSigei force-pushed the add-pagination-to-forms-endpoint branch from 19fab9b to 1914a2e Compare September 28, 2022 08:48
@KipSigei KipSigei force-pushed the add-pagination-to-forms-endpoint branch from 1914a2e to 652f2c3 Compare September 28, 2022 09:09
Signed-off-by: Kipchirchir Sigei <[email protected]>
@KipSigei KipSigei force-pushed the add-pagination-to-forms-endpoint branch 2 times, most recently from 067ff34 to 2e07021 Compare September 28, 2022 15:10
Signed-off-by: Kipchirchir Sigei <[email protected]>
@KipSigei KipSigei force-pushed the add-pagination-to-forms-endpoint branch from 2e07021 to 0dbf25e Compare September 29, 2022 06:50
@DavisRayM
Copy link
Contributor

Should we paginate the response by default ? Perhaps only allow 1000 records or something of the sort ? I don't see the need to always return past 1000 records

@KipSigei
Copy link
Contributor Author

@DavisRayM The response will always be paginated if there is a form, the condition added is to handle cases where there are no forms and page will end up being None/empty queryset

@KipSigei KipSigei merged commit abae7f0 into main Sep 29, 2022
@KipSigei KipSigei deleted the add-pagination-to-forms-endpoint branch September 29, 2022 09:00
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.

2 participants