Skip to content

Commit

Permalink
fix: some pendingDelete domains are already expired
Browse files Browse the repository at this point in the history
  • Loading branch information
maelgangloff committed Nov 15, 2024
1 parent 1ac11e3 commit 763f320
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/Controller/WatchListController.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,7 @@ public function getTrackedDomains(): array
/** @var DomainEvent|null $exp */
$exp = $domain->getEvents()->findFirst(fn (int $key, DomainEvent $e) => !$e->getDeleted() && 'expiration' === $e->getAction());

if (!$domain->getDeleted()
&& null !== $exp && $exp->getDate() > new \DateTimeImmutable()
&& count(array_filter($domain->getEvents()->toArray(), fn (DomainEvent $e) => !$e->getDeleted() && 'expiration' === $e->getAction())) > 0
&& !in_array($domain, $domains)) {
if (!$domain->getDeleted() && null !== $exp && !in_array($domain, $domains)) {
$domains[] = $domain;
}
}
Expand Down

0 comments on commit 763f320

Please sign in to comment.