From 41fbd456d2260c520e758beb9d1f4c0156e0749d Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Mon, 5 Sep 2011 10:11:47 +0200 Subject: [PATCH] add group by user-import --- openslides/participant/views.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openslides/participant/views.py b/openslides/participant/views.py index 96c142205..acf57f618 100644 --- a/openslides/participant/views.py +++ b/openslides/participant/views.py @@ -266,6 +266,14 @@ def user_import(request): profile.type = type profile.committee = committee profile.save() + + if type == 'delegate': + delegate = Group.objects.get(name='Delegierte') + user.groups.add(delegate) + else: + observer = Group.objects.get(name='Beobachter') + user.groups.add(observer) + messages.success(request, _('%d new participants were successfully imported.') % i) else: messages.error(request, _('Please check the form for errors.'))