From fcbae9841c49e19b7a0772650ed615214e2a4337 Mon Sep 17 00:00:00 2001 From: Victoria Earl Date: Fri, 22 Nov 2024 22:02:36 +0100 Subject: [PATCH] Make include_discrepancies do what it says We were accidentally selecting only discrepant receipts when you had include_discrepancies off, whoops. --- uber/site_sections/reg_reports.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uber/site_sections/reg_reports.py b/uber/site_sections/reg_reports.py index d5bb1410a..9a82007b1 100644 --- a/uber/site_sections/reg_reports.py +++ b/uber/site_sections/reg_reports.py @@ -63,7 +63,7 @@ def attendees_nonzero_balance(self, session, include_discrepancies=False): if include_discrepancies: filter = True else: - filter = Attendee.default_cost_cents != item_subquery.c.item_total + filter = Attendee.default_cost_cents == item_subquery.c.item_total attendees_and_totals = session.query( Attendee, ModelReceipt.payment_total_sql, ModelReceipt.refund_total_sql, item_subquery.c.item_total