diff options
| author | MHSanaei <ho3ein.sanaei@gmail.com> | 2026-03-04 15:05:29 +0300 |
|---|---|---|
| committer | MHSanaei <ho3ein.sanaei@gmail.com> | 2026-03-04 15:05:29 +0300 |
| commit | 57409964369a239093998a98fba9167c198db01c (patch) | |
| tree | ad28dc064b6f6cb99164491f3cac46662e386a77 /web/job | |
| parent | 874aae8080b587877ef3cf7d0048f79e09fb7233 (diff) | |
update dependencies
Diffstat (limited to 'web/job')
| -rw-r--r-- | web/job/ldap_sync_job.go | 5 |
1 files changed, 1 insertions, 4 deletions
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 { |
