diff --git a/osinaweb/osinacore/__pycache__/views.cpython-310.pyc b/osinaweb/osinacore/__pycache__/views.cpython-310.pyc index 4a5b9b20..23d9522c 100644 Binary files a/osinaweb/osinacore/__pycache__/views.cpython-310.pyc and b/osinaweb/osinacore/__pycache__/views.cpython-310.pyc differ diff --git a/osinaweb/osinacore/views.py b/osinaweb/osinacore/views.py index 581d65b5..bd56454c 100644 --- a/osinaweb/osinacore/views.py +++ b/osinaweb/osinacore/views.py @@ -366,6 +366,7 @@ def tickets(request, *args, **kwargs): # If no status is found, assume it's open open_tickets.append(ticket) else: + staff_department = request.user.staffprofile.staff_position.department all_tickets = Ticket.objects.filter(departments=request.user.staffprofile.staff_position.department) all_tickets_with_update_date = all_tickets.annotate( latest_update_date=Max('ticketupdate__date_added')) @@ -529,7 +530,7 @@ def ticket_details(request, ticket_number): if not TicketRead.objects.filter(ticket_update=update, user=request.user).exists(): TicketRead.objects.create(ticket_update=update, user=request.user, read=True) - last_ticket_status = TicketStatusUpdate.objects.all().last() + last_ticket_status = TicketStatus.objects.all().last() context = { 'ticket' : ticket,