diff --git a/app/legacy_lib/query_supporters.rb b/app/legacy_lib/query_supporters.rb index ef0b93975..838c68e17 100644 --- a/app/legacy_lib/query_supporters.rb +++ b/app/legacy_lib/query_supporters.rb @@ -286,7 +286,7 @@ def self.full_filter_expr(np_id, query) rec_ps_subquery = Qx.select("nonprofit_payments.count", "nonprofit_payments.supporter_id") .from(:nonprofit_payments) .where("kind='RecurringDonation'") - .group_by("payments.supporter_id") + .group_by("nonprofit_payments.supporter_id") .as(:rec_ps) expr = expr.add_left_join(rec_ps_subquery, "rec_ps.supporter_id=supporters.id") .and_where('rec_ps.count > 0')