diff --git a/osinaweb/customercore/__pycache__/views.cpython-310.pyc b/osinaweb/customercore/__pycache__/views.cpython-310.pyc index cedb592b..0d67ef6e 100644 Binary files a/osinaweb/customercore/__pycache__/views.cpython-310.pyc and b/osinaweb/customercore/__pycache__/views.cpython-310.pyc differ diff --git a/osinaweb/customercore/views.py b/osinaweb/customercore/views.py index a476edb3..8117aa7f 100644 --- a/osinaweb/customercore/views.py +++ b/osinaweb/customercore/views.py @@ -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')