No email notifications for inactive projects

This commit is contained in:
Karel Picman 2017-03-23 13:55:17 +01:00
parent a8eb0f8cc1
commit 8cb7a8aca9

View File

@ -87,6 +87,7 @@ class DmsfMailer < Mailer
end
def self.get_notify_users(project, files = [])
return [] unless project.active?
if files.present?
notify_files = files.select { |file| file.notify? }
return [] if notify_files.empty?