From 04bbb27b249cd518f86669bc5dc20f0bc6b52c44 Mon Sep 17 00:00:00 2001 From: Timothy Hobbs Date: Sun, 3 Dec 2023 00:34:29 +0000 Subject: [PATCH] Fix mistake in if chaining --- helpdesk/views/public.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpdesk/views/public.py b/helpdesk/views/public.py index 2ee626cb..41d7da2d 100644 --- a/helpdesk/views/public.py +++ b/helpdesk/views/public.py @@ -210,7 +210,7 @@ class ViewTicket(TemplateView): queue, ticket_id = Ticket.queue_and_id_from_query(ticket_req) if request.user.is_authenticated and request.user.email == email: ticket = Ticket.objects.get(id=ticket_id, submitter_email__iexact=email) - if hasattr(settings, 'HELPDESK_VIEW_A_TICKET_PUBLIC') and settings.HELPDESK_VIEW_A_TICKET_PUBLIC: + elif hasattr(settings, 'HELPDESK_VIEW_A_TICKET_PUBLIC') and settings.HELPDESK_VIEW_A_TICKET_PUBLIC: ticket = Ticket.objects.get(id=ticket_id, submitter_email__iexact=email) else: ticket = Ticket.objects.get(id=ticket_id, submitter_email__iexact=email, secret_key__iexact=key)