Skip to content

Commit

Permalink
DEV-1088 unlimited page size for organization members api (HumanSigna…
Browse files Browse the repository at this point in the history
  • Loading branch information
triklozoid authored Nov 9, 2021
1 parent e207e3d commit 0605d0e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions label_studio/organizations/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ class OrganizationMemberPagination(PageNumberPagination):
page_size = 20
page_size_query_param = 'page_size'

def get_page_size(self, request):
# emulate "unlimited" page_size
if self.page_size_query_param in request.query_params and request.query_params[self.page_size_query_param] == '-1':
return 1000000
return super().get_page_size(request)


@method_decorator(name='get', decorator=swagger_auto_schema(
tags=['Organizations'],
Expand Down

0 comments on commit 0605d0e

Please sign in to comment.