From 7cf3113ed38a9c619490ff3bb85c5267c12b2a35 Mon Sep 17 00:00:00 2001 From: Oliver Falk Date: Mon, 14 May 2018 13:14:24 +0200 Subject: [PATCH] It is ensure by the URLconf that the email_id is there --- ivatar/ivataraccount/views.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ivatar/ivataraccount/views.py b/ivatar/ivataraccount/views.py index dc70d50..2ffb579 100644 --- a/ivatar/ivataraccount/views.py +++ b/ivatar/ivataraccount/views.py @@ -174,10 +174,6 @@ class AssignPhotoEmailView(SuccessMessageMixin, TemplateView): @method_decorator(login_required, name='dispatch') class ImportPhotoView(SuccessMessageMixin, View): def post(self, *args, **kwargs): - if not 'email_id' in kwargs: - messages.error(self.request, _('Address not given')) - return HttpResponseRedirect(reverse_lazy('profile')) - try: email = ConfirmedEmail.objects.get(id=kwargs['email_id'], user=self.request.user) except: