oncall-engine/engine/apps/public_api
Michael Derynck f79445fbcb
Fix pagination behavior when page # exceeds search results (#4817)
# What this PR does
Change pagination to return last available page if the page number
exceeds the pages available instead of returning 404. This came up from
if the user is on a page other than the first and they enter a search
and the number of search results are smaller than what would be needed
to reach the current page number it would give a blank page and 404.

## Which issue(s) this PR closes

Related to [issue link here]

<!--
*Note*: If you want the issue to be auto-closed once the PR is merged,
change "Related to" to "Closes" in the line above.
If you have more than one GitHub issue that this PR closes, be sure to
preface
each issue link with a [closing
keyword](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests#linking-a-pull-request-to-an-issue).
This ensures that the issue(s) are auto-closed once the PR has been
merged.
-->

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] Added the relevant release notes label (see labels prefixed w/
`release:`). These labels dictate how your PR will
    show up in the autogenerated release notes.

---------

Co-authored-by: Rares Mardare <rares.mardare@grafana.com>
2024-08-19 13:59:01 +00:00
..
serializers Update alert groups public API filters support (#4832) 2024-08-15 19:58:25 +00:00
tests Fix pagination behavior when page # exceeds search results (#4817) 2024-08-19 13:59:01 +00:00
throttlers Add ratelimit for phone number verification (#1354) 2023-02-21 16:47:52 +08:00
views Update alert groups public API filters support (#4832) 2024-08-15 19:58:25 +00:00
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
constants.py Remove demo token related code/logic 2022-06-09 09:16:10 -03:00
custom_renderers.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
helpers.py Improve Slack error handling (#3000) 2023-09-12 09:49:16 +00:00
tf_sync.py Sync users and teams on tf requests (#1180) 2023-01-24 13:44:07 +08:00
urls.py Update alert groups public API filters support (#4832) 2024-08-15 19:58:25 +00:00