From b65076fa6f1321647bb1a5d845934422a08c52ce Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Wed, 25 Sep 2024 12:15:03 -0500 Subject: [PATCH] Add tag_masters cte --- app/legacy_lib/query_supporters.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/legacy_lib/query_supporters.rb b/app/legacy_lib/query_supporters.rb index 096d76a9f..d38156c95 100644 --- a/app/legacy_lib/query_supporters.rb +++ b/app/legacy_lib/query_supporters.rb @@ -211,6 +211,7 @@ def self.full_filter_expr(np_id, query) expr = Qx.select('supporters.id') .with(:nonprofits, Qx.select("*").from(:nonprofits).where("id = $id", id: np_id.to_i)) + .with(:tag_masters, Qx.select("*").from(:tag_masters).where("nonprofit_id = $id AND NOT deleted", id: np_id.to_i)) .from(:supporters) .join('nonprofits', 'nonprofits.id=supporters.nonprofit_id') .where(