From 57409964369a239093998a98fba9167c198db01c Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Wed, 4 Mar 2026 13:05:29 +0100 Subject: update dependencies --- web/job/ldap_sync_job.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'web/job') diff --git a/web/job/ldap_sync_job.go b/web/job/ldap_sync_job.go index a947eb73..7edb8178 100644 --- a/web/job/ldap_sync_job.go +++ b/web/job/ldap_sync_job.go @@ -271,10 +271,7 @@ func (j *LdapSyncJob) deleteClientsNotInLDAP(inboundTag string, ldapEmails map[s // Delete in batches for i := 0; i < len(toDelete); i += batchSize { - end := i + batchSize - if end > len(toDelete) { - end = len(toDelete) - } + end := min(i+batchSize, len(toDelete)) batch := toDelete[i:end] for _, c := range batch { -- cgit v1.2.3