Skip to content

Commit

Permalink
🐛 [#1365] Do not use fuzzy pagination for CMIS
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenbal committed May 16, 2023
1 parent 5d2cf3b commit e616231
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/openzaak/components/documenten/api/viewsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from notifications_api_common.viewsets import NotificationViewSetMixin
from rest_framework import mixins, status, viewsets
from rest_framework.decorators import action
from rest_framework.pagination import PageNumberPagination
from rest_framework.parsers import FormParser, MultiPartParser
from rest_framework.response import Response
from rest_framework.serializers import ValidationError
Expand Down Expand Up @@ -192,7 +193,6 @@ class EnkelvoudigInformatieObjectViewSet(
)
lookup_field = "uuid"
serializer_class = EnkelvoudigInformatieObjectSerializer
pagination_class = CustomPagination
permission_classes = (InformationObjectAuthRequired,)
required_scopes = {
"list": SCOPE_DOCUMENTEN_ALLES_LEZEN,
Expand All @@ -208,6 +208,12 @@ class EnkelvoudigInformatieObjectViewSet(
notifications_kanaal = KANAAL_DOCUMENTEN
audit = AUDIT_DRC

@property
def pagination_class(self):
if settings.CMIS_ENABLED:
return PageNumberPagination
return CustomPagination

@property
def swagger_schema(self):
# Ensure that schema is not imported at module level, needed to
Expand Down

0 comments on commit e616231

Please sign in to comment.