From 72a2b824fd6d6d4e3ee790704ebaba3345518f64 Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Fri, 9 Sep 2011 10:55:33 +0200 Subject: [PATCH] Added error messeage for import function if you are not superuser. --- openslides/participant/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openslides/participant/views.py b/openslides/participant/views.py index b17c0900d..5843c7988 100644 --- a/openslides/participant/views.py +++ b/openslides/participant/views.py @@ -236,7 +236,8 @@ def user_settings(request): def user_import(request): try: request.user.profile - raise NameError("you can not use this function with a User, that has a Profile") + messages.error(request, _('The import function is available for the superuser (without user profile) only.')) + return redirect(reverse('user_overview')) except Profile.DoesNotExist: pass