diff --git a/authentik/sources/ldap/sync/groups.py b/authentik/sources/ldap/sync/groups.py index 4d6ebf41c..797a3948e 100644 --- a/authentik/sources/ldap/sync/groups.py +++ b/authentik/sources/ldap/sync/groups.py @@ -67,8 +67,8 @@ class GroupLDAPSynchronizer(BaseLDAPSynchronizer): LDAPGroupSourceConnection.objects.update_or_create( defaults={ "unique_identifier": uniq, - "source": self._source, }, + source=self._source, group=ak_group, ) except (IntegrityError, FieldError, TypeError, AttributeError) as exc: diff --git a/authentik/sources/ldap/sync/users.py b/authentik/sources/ldap/sync/users.py index 5e6372184..ddead58bd 100644 --- a/authentik/sources/ldap/sync/users.py +++ b/authentik/sources/ldap/sync/users.py @@ -62,8 +62,8 @@ class UserLDAPSynchronizer(BaseLDAPSynchronizer): LDAPUserSourceConnection.objects.update_or_create( defaults={ "unique_identifier": uniq, - "source": self._source, }, + source=self._source, user=ak_user, ) except (IntegrityError, FieldError, TypeError, AttributeError) as exc: