Skip to content

Commit

Permalink
Make sending ticket emails idempotent again
Browse files Browse the repository at this point in the history
  • Loading branch information
marksteward committed May 24, 2024
1 parent eb04834 commit 6641f46
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions apps/tickets/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ def email_tickets():
Purchase.query.filter_by(is_paid_for=True, state="paid")
.join(PriceTier, Product, ProductGroup)
.filter(ProductGroup.type.in_(RECEIPT_TYPES))
.filter(Purchase.ticket_issued == False)
.join(Purchase.owner)
.with_entities(User, func.count(Purchase.id))
.group_by(User)
Expand Down

0 comments on commit 6641f46

Please sign in to comment.