mirror of
https://github.com/makeplane/plane.git
synced 2026-09-01 19:48:42 +02:00
The negative-per_page guard added earlier in this PR let per_page=0 through unchanged. A zero value still reaches OffsetPaginator.get_result(), where math.ceil(count / limit) divides by the limit and raises an unhandled ZeroDivisionError (HTTP 500) — the same unhandled-crash class this PR closes for negative values, just with a different trigger. Tighten the guard to per_page <= 0 and correct the regression test that previously asserted 0 was accepted. Co-authored-by: Plane AI <noreply@plane.so>