Skip to content

Commit

Permalink
Remove redundant checks
Browse files Browse the repository at this point in the history
  • Loading branch information
marksteward committed May 26, 2024
1 parent fd4ff7b commit 4317a64
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion apps/common/receipt.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ def set_tickets_emailed(user):

purchases = (
user.owned_purchases.filter_by(is_paid_for=True)
.filter(Purchase.state.in_(["paid"]))
.join(PriceTier, Product, ProductGroup)
.filter(ProductGroup.type.in_(RECEIPT_TYPES))
.with_entities(Purchase)
Expand Down
2 changes: 1 addition & 1 deletion apps/tickets/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def email_tickets():
return

users_purchase_counts = (
Purchase.query.filter_by(is_paid_for=True, state="paid")
Purchase.query.filter_by(is_paid_for=True)
.join(PriceTier, Product, ProductGroup)
.filter(ProductGroup.type.in_(RECEIPT_TYPES))
.filter(Purchase.ticket_issued == False)
Expand Down

0 comments on commit 4317a64

Please sign in to comment.