diff --git a/app/jobs/hackathons/send_organizer_summaries_job.rb b/app/jobs/hackathons/send_organizer_summaries_job.rb index bba66ca8..7d8fbc24 100644 --- a/app/jobs/hackathons/send_organizer_summaries_job.rb +++ b/app/jobs/hackathons/send_organizer_summaries_job.rb @@ -2,8 +2,7 @@ class Hackathons::SendOrganizerSummariesJob < ApplicationJob def perform(sent_digests) # This reloads the (possible) sent_digests array as an # ActiveRecord::Relation so that we can use includes to prevent an N+1. - @sent_digests = Hackathon::Digest.where(id: sent_digests.map(&:id)) || - Hackathon::Digest.where(created_at: 6.days.ago...Time.now) + @sent_digests = Hackathon::Digest.where(id: sent_digests.map(&:id)) @sent_digests_by_hackathons = @sent_digests .includes(listings: {hackathon: {logo_attachment: :blob}})