Fixed profle query error when there are zero results

This commit is contained in:
Prommah 2015-11-07 06:11:26 +00:00
parent f5d8960647
commit 7635051f49

View file

@ -193,7 +193,7 @@ class Match < ActiveRecord::Base
end
def send_notifications
Profile.all(include: :user, conditions: "notify_any_match = 1").find_each do |p|
Profile.includes(:user).where(notify_any_match: 1).find_each do |p|
Notifications.match p.user, self if p.user
end
contester2.team.teamers.active.each do |teamer|