emile 10 months ago
parent fc46c99dff
commit 71d175014c

BIN
.DS_Store vendored

Binary file not shown.

BIN
osinaweb/.DS_Store vendored

Binary file not shown.

Binary file not shown.

@ -386,8 +386,7 @@ def tickets(request, *args, **kwargs):
# If no status is found, assume it's open # If no status is found, assume it's open
open_tickets.append(ticket) open_tickets.append(ticket)
else: else:
staff_department = request.user.staffprofile.staff_position.department all_tickets = Ticket.objects.all()
all_tickets = Ticket.objects.filter(departments=request.user.staffprofile.staff_position.department)
all_tickets_with_update_date = all_tickets.annotate( all_tickets_with_update_date = all_tickets.annotate(
latest_update_date=Max('ticketupdate__date_added')) latest_update_date=Max('ticketupdate__date_added'))
all_tickets_ordered = all_tickets_with_update_date.order_by('-latest_update_date') all_tickets_ordered = all_tickets_with_update_date.order_by('-latest_update_date')

Loading…
Cancel
Save