Skip to content

Commit 0a8472f

Browse files
author
roadiz-ci
committed
chore: Bumped
1 parent 83277bc commit 0a8472f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/Controller/Node/RealmNodeController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use RZ\Roadiz\CoreBundle\Event\Realm\NodeLeftRealmEvent;
1313
use RZ\Roadiz\CoreBundle\Form\RealmNodeType;
1414
use RZ\Roadiz\CoreBundle\Model\RealmInterface;
15+
use RZ\Roadiz\CoreBundle\Repository\AllStatusesNodeRepository;
1516
use RZ\Roadiz\CoreBundle\Security\Authorization\Voter\NodeVoter;
1617
use RZ\Roadiz\CoreBundle\Security\LogTrail;
1718
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
@@ -29,6 +30,7 @@ public function __construct(
2930
private readonly TranslatorInterface $translator,
3031
private readonly LogTrail $logTrail,
3132
private readonly EventDispatcherInterface $eventDispatcher,
33+
private readonly AllStatusesNodeRepository $allStatusesNodeRepository,
3234
) {
3335
}
3436

@@ -85,7 +87,7 @@ public function deleteAction(Request $request, int $id, int $realmNodeId): Respo
8587
{
8688
$this->denyAccessUnlessGranted('ROLE_ACCESS_REALM_NODES');
8789
/** @var Node|null $node */
88-
$node = $this->managerRegistry->getRepository(Node::class)->find($id);
90+
$node = $this->allStatusesNodeRepository->find($id);
8991
/** @var RealmNode|null $realmNode */
9092
$realmNode = $this->managerRegistry->getRepository(RealmNode::class)->find($realmNodeId);
9193
if (null === $node || null === $realmNode) {

0 commit comments

Comments
 (0)