Skip to content

Commit

Permalink
Fix ohme import when multiple payments have same ohm identifier (#11496)
Browse files Browse the repository at this point in the history
Co-authored-by: Rémi <[email protected]>
  • Loading branch information
Remg and Rémi authored Feb 19, 2025
1 parent 7470c28 commit 4cd80df
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Repository/Contribution/PaymentRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ public function __construct(ManagerRegistry $registry)

public function findOneByOhmeIdentifier(string $identifier): ?Payment
{
return $this->createQueryBuilder('payment')
$payments = $this->createQueryBuilder('payment')
->where('payment.ohmeId = :identifier')
->setParameter('identifier', $identifier)
->getQuery()
->getOneOrNullResult()
->getResult()
;

return $payments[0] ?? null;
}

public function save(Payment $payment): void
Expand Down

0 comments on commit 4cd80df

Please sign in to comment.