From 2cdc041588969e635a30c37e262c3480e3a660bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20A=2E=20S=C3=A1nchez=20L=C3=B3pez?= Date: Fri, 13 Aug 2010 07:33:10 +0000 Subject: [PATCH] Add groups from external sources to the existing ones. Fixes #360 - Legacy-Id: 2474 --- ietf/ietfauth/auth.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ietf/ietfauth/auth.py b/ietf/ietfauth/auth.py index 7e12e393d..f24028122 100644 --- a/ietf/ietfauth/auth.py +++ b/ietf/ietfauth/auth.py @@ -99,13 +99,11 @@ class IetfUserBackend(RemoteUserBackend): # Update group memberships group_names = IetfUserBackend.find_groups(user.username) - groups = [] for group_name in group_names: # Create groups as needed group,created = Group.objects.get_or_create(name=group_name) if created: log("IetfUserBackend created Group '%s'" % (group_name,)) - groups.append(group) - user.groups = groups + user.groups.add(group) return user