mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
fix: domain event refresh working one every two times
This commit is contained in:
@@ -115,10 +115,10 @@ class WatchListController extends AbstractController
|
|||||||
->where('de.domain = :domain')
|
->where('de.domain = :domain')
|
||||||
->andWhere('de.action = \'expiration\'')
|
->andWhere('de.action = \'expiration\'')
|
||||||
->andWhere('de.deleted = FALSE')
|
->andWhere('de.deleted = FALSE')
|
||||||
->setParameter('domain', $domain)
|
|
||||||
->orderBy('de.date', 'DESC')
|
->orderBy('de.date', 'DESC')
|
||||||
->setMaxResults(1)
|
->setMaxResults(1)
|
||||||
->getQuery()
|
->getQuery()
|
||||||
|
->setParameter('domain', $domain)
|
||||||
->getOneOrNullResult();
|
->getOneOrNullResult();
|
||||||
|
|
||||||
if (!$domain->getDeleted() && null !== $exp && !in_array($domain, $domains)) {
|
if (!$domain->getDeleted() && null !== $exp && !in_array($domain, $domains)) {
|
||||||
|
|||||||
@@ -378,6 +378,10 @@ class RDAPService
|
|||||||
|
|
||||||
if (null === $event) {
|
if (null === $event) {
|
||||||
$event = new DomainEvent();
|
$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
|
$domain->addEvent($event
|
||||||
|
|||||||
Reference in New Issue
Block a user