From 50c7b8e814540a8bde9faf79786407a18f08f9cc Mon Sep 17 00:00:00 2001 From: Sidney Richards Date: Thu, 28 Nov 2024 17:00:36 +0100 Subject: [PATCH] [#2910] Remove pagination cap from all ZGW requests --- src/open_inwoner/cms/cases/views/services.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/open_inwoner/cms/cases/views/services.py b/src/open_inwoner/cms/cases/views/services.py index d9ae67e08c..35d8898413 100644 --- a/src/open_inwoner/cms/cases/views/services.py +++ b/src/open_inwoner/cms/cases/views/services.py @@ -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)