diff --git a/openslides/utils/views.py b/openslides/utils/views.py index 5d008512e..93bb82658 100644 --- a/openslides/utils/views.py +++ b/openslides/utils/views.py @@ -169,6 +169,10 @@ class UpdateView(PermissionMixin, _UpdateView): template_manipulation.send(sender=self.__class__, request=self.request, context=context) return context + def form_invalid(self, form): + messages.error(self.request, _('Please check the form for errors.')) + return super(UpdateView, self).form_invalid(form) + class CreateView(PermissionMixin, _CreateView): def get_success_url(self): @@ -185,6 +189,10 @@ class CreateView(PermissionMixin, _CreateView): #todo: Versuche apply url automatisch anhand on self.object herauszufindne return self.apply_url + def form_invalid(self, form): + messages.error(self.request, _('Please check the form for errors.')) + return super(CreateView, self).form_invalid(form) + class DeleteView(RedirectView, SingleObjectMixin): def pre_redirect(self, request, *args, **kwargs):