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

[#2910] Lift pagination cap on fetches cases on list page #1507

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/open_inwoner/cms/cases/views/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,16 @@ def get_cases(self) -> list[ZaakWithApiGroup]:

def _get_cases_for_api_group(self, group: ZGWApiGroupConfig) -> list[Zaak]:
raw_cases = group.zaken_client.fetch_cases(
**get_user_fetch_parameters(self.request)
**get_user_fetch_parameters(self.request),
# TODO: This is not ideal. We should really paginate with the full knowledge
# of the total count (which the API returns but our current client
# implementation does not expose), and simply fetch a page at a time whilst
# providing next/previous and arbitrary jumping functionality. But that will
# need new client methods.
#
# This is a stopgap to avoid people running into a limit, as 100ish cases
# is, certainly in test environments, not uncommon.
max_requests=15,
)
resolved_cases = self.resolve_cases(raw_cases, group)

Expand Down
Loading