diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fea153..2ffa5d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.2.1 + +* Fix a bug when using the method `getOneByCustomer` on card service + ## 1.2.0 * Update mapping so that when fetching a subscription, plan and (eventual) discount are loaded eagerly instead of diff --git a/src/Service/CardService.php b/src/Service/CardService.php index ee86da3..80cbfb4 100644 --- a/src/Service/CardService.php +++ b/src/Service/CardService.php @@ -160,7 +160,7 @@ public function getById($id) */ public function getOneByCustomer(CustomerInterface $customer) { - return $this->cardRepository->findOneBy(['customer' => $customer]); + return $this->cardRepository->findOneBy(['owner' => $customer]); } /**