Skip to content

Commit

Permalink
feat: Hide Donations if they're set as anonymous
Browse files Browse the repository at this point in the history
  • Loading branch information
anshg1214 committed Sep 18, 2024
1 parent a0e5d44 commit 973c213
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions listenbrainz/db/donation.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def get_recent_donors(meb_conn, db_conn, count: int, offset: int):
FROM payment
WHERE editor_id IS NOT NULL
AND is_donation = 't'
AND (anonymous != 't' OR anonymous IS NULL)
AND payment_date >= (NOW() - INTERVAL '1 year')
ORDER BY payment_date DESC
LIMIT :count
Expand Down Expand Up @@ -130,6 +131,7 @@ def get_biggest_donors(meb_conn, db_conn, count: int, offset: int):
FROM payment
WHERE editor_id IS NOT NULL
AND is_donation = 't'
AND (anonymous != 't' OR anonymous IS NULL)
AND payment_date >= (NOW() - INTERVAL '1 year')
)
SELECT editor_name
Expand Down

0 comments on commit 973c213

Please sign in to comment.