From 46667975ea5848e27660fdb6ebc4c009f079cc76 Mon Sep 17 00:00:00 2001 From: awieckowski Date: Tue, 29 Oct 2024 08:57:50 +0100 Subject: [PATCH] Fix LDAP Groups sync --- src/ralph/accounts/ldap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ralph/accounts/ldap.py b/src/ralph/accounts/ldap.py index d8cdabe5bd..5dfb36b3ab 100644 --- a/src/ralph/accounts/ldap.py +++ b/src/ralph/accounts/ldap.py @@ -66,7 +66,7 @@ def mirror_groups(self): new_groups = [Group.objects.get_or_create(name=name)[0] for name in target_group_names if name not in existing_group_names] - self._user.groups = existing_groups + new_groups + self._user.groups.set(existing_groups + new_groups) _LDAPUser._mirror_groups_original = _LDAPUser._mirror_groups _LDAPUser._mirror_groups = mirror_groups