emile 1 year ago
parent 7cfd43a8c4
commit e75f9400bc

@ -207,8 +207,9 @@ def customer_ticket_details(request, ticket_number):
ticket = get_object_or_404(Ticket, ticket_number=ticket_number)
# Check if the logged-in user is the customer associated with the ticket
if ticket.customer != request.user.customerprofile:
raise Http404("Page not found.")
if request.user.is_authenticated:
if ticket.customer != request.user.customerprofile:
raise Http404("Page not found.")
ticket_updates = TicketUpdate.objects.filter(ticket=ticket).order_by('id')

Loading…
Cancel
Save