From cd9e3582dc4672ebf5c0282c01d7bdb4021dc2cc Mon Sep 17 00:00:00 2001 From: david Date: Sat, 26 Aug 2023 13:24:00 +0300 Subject: [PATCH] fix entityId with donationId for chcking donation --- Model/DonationManagement.php | 2 +- Model/DonationRepository.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Model/DonationManagement.php b/Model/DonationManagement.php index 05910ae..f84a5ab 100644 --- a/Model/DonationManagement.php +++ b/Model/DonationManagement.php @@ -89,7 +89,7 @@ public function getByOrder(Order $order): DonationInterface $this->donationResource->load($entity, $orderId, DonationInterface::ORDER_ID); - if (!$entity->getEntityId()) { + if (!$entity->getDonationId()) { throw new NoSuchEntityException(__("The requested donation does not exist.")); } diff --git a/Model/DonationRepository.php b/Model/DonationRepository.php index b63d5e1..f2e7603 100644 --- a/Model/DonationRepository.php +++ b/Model/DonationRepository.php @@ -63,7 +63,7 @@ public function get(int $id): DonationInterface } $entity = $this->donationFactory->create(); $this->donationResource->load($entity, $id); - if (!$entity->getEntityId()) { + if (!$entity->getDonationId()) { throw new NoSuchEntityException(__("The requested donation does not exist.")); } return $entity;