mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-12-27 09:08:53 +01:00
Check user is authenticated and usersettings_helpdesk model is created before attempting to read a tickets_per_page, otherwise use default value
This commit is contained in:
parent
d3cb9fdf23
commit
58a23fed13
@ -99,7 +99,10 @@ def dashboard(request):
|
|||||||
with options for them to 'Take' ownership of said tickets.
|
with options for them to 'Take' ownership of said tickets.
|
||||||
"""
|
"""
|
||||||
# user settings num tickets per page
|
# user settings num tickets per page
|
||||||
tickets_per_page = request.user.usersettings_helpdesk.tickets_per_page or 25
|
if request.user.is_authenticated and hasattr(request.user, 'usersettings_helpdesk'):
|
||||||
|
tickets_per_page = request.user.usersettings_helpdesk.tickets_per_page
|
||||||
|
else:
|
||||||
|
tickets_per_page = 25
|
||||||
|
|
||||||
# page vars for the three ticket tables
|
# page vars for the three ticket tables
|
||||||
user_tickets_page = request.GET.get(_('ut_page'), 1)
|
user_tickets_page = request.GET.get(_('ut_page'), 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user