Remove unneeded where clause

This commit is contained in:
Eric Schultz 2019-01-22 15:41:38 -06:00 committed by Eric Schultz
parent 73be70b872
commit ebea75d279

View file

@ -28,9 +28,6 @@ module QuerySupporters
.add_join('profiles', 'profiles.user_id = users.id') .add_join('profiles', 'profiles.user_id = users.id')
.as("users").parse, "users.profiles_id=campaigns.profile_id") .as("users").parse, "users.profiles_id=campaigns.profile_id")
.where("supporters.nonprofit_id=$id", id: np_id) .where("supporters.nonprofit_id=$id", id: np_id)
.where("donations.campaign_id IN (#{QueryCampaigns
.get_campaign_and_children(campaign_id)
.parse})")
.group_by('supporters.id') .group_by('supporters.id')
.order_by('MAX(donations.date) DESC') .order_by('MAX(donations.date) DESC')