Skip to content

API: do not set rel="next" pagination header when no records found

Toon Claes requested to merge tc-git-tower-pagination-links into master

What does this MR do?

When there are no records found, there is no next page, so the Link header of the API response should not set the rel="next".

The fix was implemented as suggested in https://github.com/kaminari/kaminari/pull/877#issuecomment-288099591.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Fixes gitlab-org/gitlab-ce#36618

Related to gitlab-com/infrastructure#2532 (closed)

Edited by Toon Claes

Merge request reports