diff --git a/openslides/application/views.py b/openslides/application/views.py index 827f1fcf6..d520e3548 100644 --- a/openslides/application/views.py +++ b/openslides/application/views.py @@ -176,6 +176,8 @@ def edit(request, application_id=None): return redirect(reverse('application_view', args=[application.id])) if application_id is None: return redirect(reverse('application_edit', args=[application.id])) + else: + messages.error(request, _('Please check the form for errors.')) else: if application_id is None: initial = {'text': config_get('application_preamble')} diff --git a/openslides/assignment/views.py b/openslides/assignment/views.py index f8d6047e5..9c06ac1b4 100644 --- a/openslides/assignment/views.py +++ b/openslides/assignment/views.py @@ -114,6 +114,8 @@ def edit(request, assignment_id=None): return redirect(reverse("assignment_overview")) if assignment_id is None: return redirect(reverse('assignment_edit', args=[assignment.id])) + else: + messages.error(request, _('Please check the form for errors.')) else: form = AssignmentForm(instance=assignment) return { diff --git a/openslides/participant/views.py b/openslides/participant/views.py index d6bcb71db..74a076725 100644 --- a/openslides/participant/views.py +++ b/openslides/participant/views.py @@ -109,7 +109,7 @@ def get_overview(request): @template('participant/edit.html') def edit(request, user_id=None): """ - View zum editieren und neuanlegen von Usern mit Profile + View to create and edit users with profile. """ if user_id is not None: user = User.objects.get(id=user_id) @@ -124,7 +124,7 @@ def edit(request, user_id=None): userform = UserEditForm(request.POST, instance=user, prefix="user") profileform = ProfileForm(request.POST, instance=user.profile, prefix="profile") - if userform.is_valid and profileform.is_valid: + if userform.is_valid() and profileform.is_valid(): user = userform.save() if user_id is None: user.username = gen_username(user.first_name, user.last_name)