fix: domain event refresh working one every two times

This commit is contained in:
vinceh121
2025-10-20 22:37:11 +02:00
parent 543fcebdec
commit 68cb366585
2 changed files with 5 additions and 1 deletions

View File

@@ -115,10 +115,10 @@ class WatchListController extends AbstractController
->where('de.domain = :domain')
->andWhere('de.action = \'expiration\'')
->andWhere('de.deleted = FALSE')
->setParameter('domain', $domain)
->orderBy('de.date', 'DESC')
->setMaxResults(1)
->getQuery()
->setParameter('domain', $domain)
->getOneOrNullResult();
if (!$domain->getDeleted() && null !== $exp && !in_array($domain, $domains)) {

View File

@@ -378,6 +378,10 @@ class RDAPService
if (null === $event) {
$event = new DomainEvent();
} else {
// at this point Doctrine doesn't know that the events are
// deleted in the database, so refresh in order to make the diff work
$this->em->refresh($event);
}
$domain->addEvent($event