Skip to content

Commit

Permalink
fix queries that check for payment accounts in SEPA
Browse files Browse the repository at this point in the history
  • Loading branch information
Changaco committed Sep 10, 2024
1 parent 66dcd2c commit 7add4e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions liberapay/models/participant.py
Original file line number Diff line number Diff line change
Expand Up @@ -3377,6 +3377,7 @@ def group_tips_into_payments(self, tips):
AND t.member IN %(members)s
AND a.provider = 'stripe'
AND a.is_current
AND a.charges_enabled
AND a.country IN %(SEPA)s
LIMIT 1
""", dict(members=members, tippee=tip.tippee, SEPA=SEPA))
Expand All @@ -3398,6 +3399,7 @@ def group_tips_into_payments(self, tips):
WHERE a.participant = %(tippee)s
AND a.provider = 'stripe'
AND a.is_current
AND a.charges_enabled
AND a.country IN %(SEPA)s
LIMIT 1
""", dict(tippee=tip.tippee, SEPA=SEPA))
Expand Down
2 changes: 2 additions & 0 deletions www/%username/giving/pay/%payment_id.spt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def is_sepa(payment):
AND p.is_suspended IS NOT TRUE
AND a.provider = 'stripe'
AND a.is_current
AND a.charges_enabled
AND a.country IN %(SEPA)s
LIMIT 1
""", dict(tippee=tip.tippee, SEPA=SEPA), default=False)
Expand All @@ -38,6 +39,7 @@ def is_sepa(payment):
WHERE a.participant = %(tippee)s
AND a.provider = 'stripe'
AND a.is_current
AND a.charges_enabled
AND a.country IN %(SEPA)s
LIMIT 1
""", dict(tippee=tip.tippee, SEPA=SEPA), default=False)
Expand Down

0 comments on commit 7add4e5

Please sign in to comment.