mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-08-18 19:58:32 +02:00
Issue #125: If you have no tickets, the reports throw a 500 server error. This
patch removes the report links when there's no tickets in the system. Thanks to Kestutis Gustaitis for the bug report.
This commit is contained in:
@@ -703,8 +703,11 @@ rss_list = staff_member_required(rss_list)
|
||||
|
||||
|
||||
def report_index(request):
|
||||
number_tickets = Ticket.objects.all().count()
|
||||
return render_to_response('helpdesk/report_index.html',
|
||||
RequestContext(request, {}))
|
||||
RequestContext(request, {
|
||||
'number_tickets': number_tickets,
|
||||
}))
|
||||
report_index = staff_member_required(report_index)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user