mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-09 14:52:57 +03:00
fix: add missing rollback for LDAP sync
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user