fix: add missing rollback for LDAP sync

This commit is contained in:
Elias Schneider
2025-04-09 14:05:53 +02:00
parent 7e5d16be9b
commit 658a9ca6dd

View File

@@ -58,6 +58,9 @@ func (s *LdapService) createClient() (*ldap.Conn, error) {
func (s *LdapService) SyncAll(ctx context.Context) error {
// Start a transaction
tx := s.db.Begin()
defer func() {
tx.Rollback()
}()
err := s.SyncUsers(ctx, tx)
if err != nil {