Skip to content

Commit

Permalink
Properly get card by customer
Browse files Browse the repository at this point in the history
  • Loading branch information
bakura10 committed Feb 24, 2015
1 parent f57e9ad commit 11b636c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Service/CardService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}

/**
Expand Down

0 comments on commit 11b636c

Please sign in to comment.