From 2a6479062f3eb9bec782f9cb2f2e97cb472661f1 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 27 Sep 2023 12:54:33 +0200 Subject: [PATCH] don't overwrite connections for other sources Signed-off-by: Jens Langhammer --- authentik/sources/ldap/sync/groups.py | 2 +- authentik/sources/ldap/sync/users.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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: