diff --git a/layerindex/forms.py b/layerindex/forms.py index 283ae9d..13ba3aa 100644 --- a/layerindex/forms.py +++ b/layerindex/forms.py @@ -249,7 +249,7 @@ class EditProfileForm(StyledModelForm): if 'answer_1' not in self.changed_data \ or 'answer_2' not in self.changed_data \ or 'answer_3' not in self.changed_data: - raise forms.ValidationError("Please answer three security questions.") + raise forms.ValidationError("Please provide answers for all three security questions.") security_question_1 = self.cleaned_data["security_question_1"] security_question_2 = self.cleaned_data["security_question_2"] security_question_3 = self.cleaned_data["security_question_3"] diff --git a/layerindex/views.py b/layerindex/views.py index 3aa459a..2dacf51 100644 --- a/layerindex/views.py +++ b/layerindex/views.py @@ -933,7 +933,7 @@ class EditProfileFormView(SuccessMessageMixin, UpdateView): view.send_activation_email(user) return HttpResponseRedirect(reverse('reregister')) - return HttpResponseRedirect(self.get_success_url()) + return super(EditProfileFormView, self).form_valid(form) def get_success_message(self, cleaned_data): return "Profile saved successfully"