diff --git a/users_ldap_groups/users_ldap_groups.py b/users_ldap_groups/users_ldap_groups.py index 6aec46d32..68b925c67 100644 --- a/users_ldap_groups/users_ldap_groups.py +++ b/users_ldap_groups/users_ldap_groups.py @@ -92,7 +92,7 @@ class CompanyLDAP(models.Model): logger = logging.getLogger('users_ldap_groups') if self.only_ldap_groups: logger.debug('deleting all groups from user %d' % user_id) - userobj.write([user_id], {'groups_id': [(5, )]}) + user.write({'groups_id': [(5, )]}) for mapping in this.group_mappings: operator = mapping.operator