From 787a727ecf749a6f12afa3d392e8af932ab5dcf6 Mon Sep 17 00:00:00 2001 From: Ross Poulton Date: Wed, 10 Dec 2008 09:27:07 +0000 Subject: [PATCH] Fix issue #32: Public view for queues with a hyphen in the slug caused an error. Thanks to simeonf. --- views/public.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/views/public.py b/views/public.py index a429f39a..d96ee9c4 100644 --- a/views/public.py +++ b/views/public.py @@ -60,7 +60,10 @@ def view_ticket(request): error_message = '' if ticket and email: - queue, ticket_id = ticket.split('-') + parts = ticket.split('-') + queue = '-'.join(parts[0:-1]) + ticket_id = parts[-1] + try: t = Ticket.objects.get(id=ticket_id, queue__slug__iexact=queue, submitter_email__iexact=email) except Ticket.DoesNotExist: