0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-12-01 04:12:23 +01:00
This commit is contained in:
Eric Duong 2022-02-15 18:10:59 -05:00 committed by GitHub
parent 77c815be23
commit b406b316ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,10 +177,8 @@ class CohortViewSet(StructuredViewSetMixin, viewsets.ModelViewSet):
_should_paginate = should_paginate(actors, filter.limit)
next_url = format_query_params_absolute_url(request, filter.offset + filter.limit) if _should_paginate else None
previous_url = (
format_query_params_absolute_url(
request, filter.offset - filter.limit if filter.offset - filter.limit > 0 else 0
)
if filter.offset - filter.limit > 0
format_query_params_absolute_url(request, filter.offset - filter.limit)
if filter.offset - filter.limit >= 0
else None
)