Ticket #403 - This code changes the behaviour of lookups for tickets and

ignores the queue name. This means that queue changes on a ticket dont
break the email links which have already been sent out.
The queue name still exists in the link/url, but is not used in the
lookup
This commit is contained in:
Daryl
2016-06-24 13:46:37 +12:00
parent 8a7fe5fcbf
commit e5a6686c6d
2 changed files with 51 additions and 1 deletions

View File

@ -83,7 +83,7 @@ def view_ticket(request):
ticket_id = parts[-1]
try:
ticket = Ticket.objects.get(id=ticket_id, queue__slug__iexact=queue, submitter_email__iexact=email)
ticket = Ticket.objects.get(id=ticket_id, submitter_email__iexact=email)
except:
ticket = False
error_message = _('Invalid ticket ID or e-mail address. Please try again.')