Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
don't transfer tips to participants who don't want to receive them
Browse files Browse the repository at this point in the history
fixed #916
  • Loading branch information
Changaco committed Jul 28, 2014
1 parent 5b7e216 commit 058c925
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gittip/billing/payday.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ def prepare(cursor, ts_start):
, balanced_customer_href
, last_bill_result
, is_suspicious
, goal
FROM participants
WHERE is_suspicious IS NOT true
AND claimed_time < %(ts_start)s
Expand All @@ -160,8 +161,9 @@ def prepare(cursor, ts_start):
ORDER BY tipper, tippee, mtime DESC
) t
JOIN pay_participants p ON p.username = t.tipper
JOIN pay_participants p2 ON p2.username = t.tippee
WHERE t.amount > 0
AND t.tippee IN (SELECT username FROM pay_participants)
AND (p2.goal IS NULL or p2.goal >= 0)
AND ( SELECT id
FROM pay_transfers t2
WHERE t.tipper = t2.tipper
Expand Down

0 comments on commit 058c925

Please sign in to comment.