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