don't overwrite connections for other sources

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer 2023-09-27 12:54:33 +02:00
parent 52463b8f96
commit 2a6479062f
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -67,8 +67,8 @@ class GroupLDAPSynchronizer(BaseLDAPSynchronizer):
LDAPGroupSourceConnection.objects.update_or_create( LDAPGroupSourceConnection.objects.update_or_create(
defaults={ defaults={
"unique_identifier": uniq, "unique_identifier": uniq,
"source": self._source,
}, },
source=self._source,
group=ak_group, group=ak_group,
) )
except (IntegrityError, FieldError, TypeError, AttributeError) as exc: except (IntegrityError, FieldError, TypeError, AttributeError) as exc:

View file

@ -62,8 +62,8 @@ class UserLDAPSynchronizer(BaseLDAPSynchronizer):
LDAPUserSourceConnection.objects.update_or_create( LDAPUserSourceConnection.objects.update_or_create(
defaults={ defaults={
"unique_identifier": uniq, "unique_identifier": uniq,
"source": self._source,
}, },
source=self._source,
user=ak_user, user=ak_user,
) )
except (IntegrityError, FieldError, TypeError, AttributeError) as exc: except (IntegrityError, FieldError, TypeError, AttributeError) as exc: