From 1c64239d89e7b0618792a96a358d4a2d775ec844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Gangloff?= Date: Fri, 13 Dec 2024 16:25:53 +0100 Subject: [PATCH] fix: disable domain status diff when domain creation --- src/Service/RDAPService.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Service/RDAPService.php b/src/Service/RDAPService.php index ad6f2fe..a2390bb 100644 --- a/src/Service/RDAPService.php +++ b/src/Service/RDAPService.php @@ -191,13 +191,13 @@ readonly class RDAPService $this->em->persist($domain); $this->em->flush(); - $domainStatus = (new DomainStatus()) - ->setDomain($domain) - ->setDate($domain->getUpdatedAt()) - ->setAddStatus($addedStatus) - ->setDeleteStatus($deletedStatus); - - $this->em->persist($domainStatus); + if ($domain->getUpdatedAt() !== $domain->getCreatedAt()) { + $this->em->persist((new DomainStatus()) + ->setDomain($domain) + ->setDate($domain->getUpdatedAt()) + ->setAddStatus($addedStatus) + ->setDeleteStatus($deletedStatus)); + } } } else { $this->logger->warning('The domain name {idnDomain} has no WHOIS status.', [