Catch the right DoesNotExist exception in ConfirmEmailView

parent 79f3b1f8
......@@ -90,20 +90,20 @@ class ConfirmEmailView(View, TemplateResponseMixin):
def get(self, request, *args, **kwargs):
entry = Entry.objects.filter(pk=kwargs['pk'])
processed = None
processed = 0
try:
processed = services.confirm_entry(entry)
except ValidationError:
pass
if processed == 0:
return redirect('registrations:register')
try:
emails.send_new_registration_board_message(entry.get())
except Registration.DoesNotExist:
except Entry.DoesNotExist:
pass
if processed is None:
return redirect('registrations:register')
return self.render_to_response({})
......
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