forked from extern/django-helpdesk
Catch exception when someone enters a non-integer text into the public ticket view form, #576
This commit is contained in:
parent
1d63e25855
commit
03599f462b
@ -43,11 +43,15 @@ def homepage(request):
|
||||
return render(request, template_name='helpdesk/public_spam.html')
|
||||
else:
|
||||
ticket = form.save()
|
||||
return HttpResponseRedirect('%s?ticket=%s&email=%s' % (
|
||||
reverse('helpdesk:public_view'),
|
||||
ticket.ticket_for_url,
|
||||
urlquote(ticket.submitter_email))
|
||||
)
|
||||
try:
|
||||
return HttpResponseRedirect('%s?ticket=%s&email=%s' % (
|
||||
reverse('helpdesk:public_view'),
|
||||
ticket.ticket_for_url,
|
||||
urlquote(ticket.submitter_email))
|
||||
)
|
||||
except ValueError:
|
||||
# if someone enters a non-int string for the ticket
|
||||
return HttpResponseRedirect(reverse('helpdesk:home'))
|
||||
else:
|
||||
try:
|
||||
queue = Queue.objects.get(slug=request.GET.get('queue', None))
|
||||
|
Loading…
Reference in New Issue
Block a user