mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-18 10:15:41 +00:00
fix: duplicate key value violates unique constraint domain_pkey
This commit is contained in:
parent
735e868727
commit
bb30a092e8
@ -153,7 +153,9 @@ readonly class RDAPService
|
||||
throw new NotFoundHttpException("The domain name $idnDomain is not present in the WHOIS database.");
|
||||
}
|
||||
|
||||
$domain->setRdapServer($rdapServer)->setDelegationSigned(isset($rdapData['secureDNS']['delegationSigned']) && true === $rdapData['secureDNS']['delegationSigned']);
|
||||
$domain
|
||||
->setRdapServer($rdapServer)
|
||||
->setDelegationSigned(isset($rdapData['secureDNS']['delegationSigned']) && $rdapData['secureDNS']['delegationSigned']);
|
||||
|
||||
$this->updateDomainHandle($domain, $rdapData);
|
||||
|
||||
@ -163,7 +165,6 @@ readonly class RDAPService
|
||||
|
||||
$domain->setDeleted(false)->updateTimestamps();
|
||||
|
||||
$this->em->persist($domain);
|
||||
$this->em->flush();
|
||||
$this->em->commit();
|
||||
|
||||
@ -364,7 +365,10 @@ readonly class RDAPService
|
||||
$domainEntity->setDeleted(true);
|
||||
}
|
||||
|
||||
if (isset($rdapData['entities']) && is_array($rdapData['entities'])) {
|
||||
if (!isset($rdapData['entities']) || !is_array($rdapData['entities'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($rdapData['entities'] as $rdapEntity) {
|
||||
$roles = $this->extractEntityRoles($rdapData['entities'], $rdapEntity);
|
||||
$entity = $this->registerEntity($rdapEntity, $roles, $domain->getLdhName(), $domain->getTld());
|
||||
@ -388,7 +392,6 @@ readonly class RDAPService
|
||||
$this->em->flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \DateMalformedStringException
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user