diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 72a4a241157b7f94980345530bec3a672ce35fca..d7234985e6a2b159fb998ec349b4602f455f8a6c 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -28,7 +28,7 @@ class FilesController < ApplicationController attachments = Attachment.attach_files(container, params[:attachments]) render_attachment_warning_if_needed(container) - if !attachments.empty? && Setting.notified_events.include?('file_added') + if !attachments.empty? && !attachments[:files].blank? && Setting.notified_events.include?('file_added') Mailer.deliver_attachments_added(attachments[:files]) end redirect_to project_files_path(@project)