##// END OF EJS Templates
Use eager loaded #principal association instead of #user (#11904)....
Jean-Philippe Lang -
r10259:18d1c62ca8a8
parent child
Show More
@@ -472,7 +472,7 class Project < ActiveRecord::Base
472 # Returns the users that should be notified on project events
472 # Returns the users that should be notified on project events
473 def notified_users
473 def notified_users
474 # TODO: User part should be extracted to User#notify_about?
474 # TODO: User part should be extracted to User#notify_about?
475 members.select {|m| m.mail_notification? || m.user.mail_notification == 'all'}.collect {|m| m.principal}
475 members.select {|m| m.principal.present? && (m.mail_notification? || m.principal.mail_notification == 'all')}.collect {|m| m.principal}
476 end
476 end
477
477
478 # Returns an array of all custom fields enabled for project issues
478 # Returns an array of all custom fields enabled for project issues
General Comments 0
You need to be logged in to leave comments. Login now