Skip to content

Commit

Permalink
fix entityId with donationId for chcking donation
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidVin357 committed Aug 26, 2023
1 parent 35f7298 commit cd9e358
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 cd9e358

Please sign in to comment.