Skip to content

add get_safe_page helper method for ModelListView#4229

Open
jonbulz wants to merge 1 commit intodevelopfrom
fix/catch-empty-page-exception
Open

add get_safe_page helper method for ModelListView#4229
jonbulz wants to merge 1 commit intodevelopfrom
fix/catch-empty-page-exception

Conversation

@jonbulz
Copy link
Copy Markdown
Contributor

@jonbulz jonbulz commented Apr 7, 2026

Short description

Changing the page size in a list view can result in a 404 exception if the page does not exist with the new entries per page setting. PaginationMixin (introduced in #3963 ) handles this gracefully, but our existing ModelListViews don't use PaginationMixin. This PR introduces a shared helper method to handle EmptyPage exceptions in all list views.

Proposed changes

  • add get_safe_page helper method and use it in PaginationMixin and ModelListView

Side effects

  • None

Faithfulness to issue description and design

There are no intended deviations from the issue and design.

How to test

Ensure that no 404 occurs on any list view when changing the page size

Resolved issues

Fixes: #3249


Pull Request Review Guidelines

Copy link
Copy Markdown
Member

@MizukiTemma MizukiTemma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 😸 Thank you for speedy fix!

We can add a release note, this fix is visible for users 📝

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Changing "number of entries per page" for languages in Netzwerkumgebung not working

2 participants