Skip to content

Commit

Permalink
Merge pull request #25 from donmo-roundup/fix/donationId-check
Browse files Browse the repository at this point in the history
fix entityId with donationId for checking donation
  • Loading branch information
DavidVin357 committed Aug 26, 2023
2 parents 35f7298 + cd9e358 commit 649b0b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Model/DonationManagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -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."));
}

Expand Down
2 changes: 1 addition & 1 deletion Model/DonationRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 649b0b9

Please sign in to comment.