Skip to content

Commit

Permalink
Add tag_masters cte
Browse files Browse the repository at this point in the history
  • Loading branch information
wwahammy committed Sep 25, 2024
1 parent 4921aea commit b65076f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/legacy_lib/query_supporters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit b65076f

Please sign in to comment.