Fix: [msgraph calendar subscription] fix infinite iterating on calendar subscription

When the total of user to subscribe is a multiple of offset, the subscription was an infinite loop
This commit is contained in:
Julien Fastré 2023-04-14 23:41:37 +02:00
parent 33051366d4
commit ffa94dbe40
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB

View File

@ -76,7 +76,7 @@ class MapAndSubscribeUserCalendarCommand extends Command
'expiration' => $expiration->format(DateTimeImmutable::ATOM),
]);
while ($offset < ($total - 1)) {
while ($offset < $total) {
$users = $this->userRepository->findByMostOldSubscriptionOrWithoutSubscriptionOrData(
$interval,
$limit,