mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Closes #11807: Restore default page size when navigating between views
This commit is contained in:
@ -2,6 +2,10 @@
|
||||
|
||||
## v3.4.6 (FUTURE)
|
||||
|
||||
### Enhancements
|
||||
|
||||
* [#11807](https://github.com/netbox-community/netbox/issues/11807) - Restore default page size when navigating between views
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* [#11796](https://github.com/netbox-community/netbox/issues/11796) - When importing devices, restrict rack by location only if the location field is specified
|
||||
|
@ -24,7 +24,7 @@ PREFERENCES = {
|
||||
'pagination.per_page': UserPreference(
|
||||
label=_('Page length'),
|
||||
choices=get_page_lengths(),
|
||||
description=_('The number of objects to display per page'),
|
||||
description=_('The default number of objects to display per page'),
|
||||
coerce=lambda x: int(x)
|
||||
),
|
||||
'pagination.placement': UserPreference(
|
||||
|
@ -76,8 +76,6 @@ def get_paginate_count(request):
|
||||
if 'per_page' in request.GET:
|
||||
try:
|
||||
per_page = int(request.GET.get('per_page'))
|
||||
if request.user.is_authenticated:
|
||||
request.user.config.set('pagination.per_page', per_page, commit=True)
|
||||
return _max_allowed(per_page)
|
||||
except ValueError:
|
||||
pass
|
||||
|
Reference in New Issue
Block a user