Commit e201a321 authored by stef's avatar stef

[fix] 404 on already confirmed

parent e68a234b
......@@ -97,10 +97,12 @@ def confirm(request, id, name=None):
return HttpResponse(unicode(_("Thank you, this has been already confirmed")))
c.save()
return HttpResponse('<div class="confirm_thanks">%s</div>' % unicode(_('Thank you for your confirmation')) )
c=Confirmation.objects.get(key=id)
if c:
c.key=''
c.save()
try:
c = get_object_or_404(Confirmation, key=id)
except:
return HttpResponse(unicode(_("Thank you, this has been already confirmed")))
c.key=''
c.save()
messages.add_message(request, messages.INFO, unicode(_('Thank you for verifying your confirmation')))
return HttpResponseRedirect('/') # Redirect after POST
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment