##// END OF EJS Templates
Fixed: error on mail notification when adding an invalid file (#6452)....
Jean-Philippe Lang -
r4063:e9686cbbe57a
parent child
Show More
@@ -28,7 +28,7 class FilesController < ApplicationController
28 attachments = Attachment.attach_files(container, params[:attachments])
28 attachments = Attachment.attach_files(container, params[:attachments])
29 render_attachment_warning_if_needed(container)
29 render_attachment_warning_if_needed(container)
30
30
31 if !attachments.empty? && Setting.notified_events.include?('file_added')
31 if !attachments.empty? && !attachments[:files].blank? && Setting.notified_events.include?('file_added')
32 Mailer.deliver_attachments_added(attachments[:files])
32 Mailer.deliver_attachments_added(attachments[:files])
33 end
33 end
34 redirect_to project_files_path(@project)
34 redirect_to project_files_path(@project)
General Comments 0
You need to be logged in to leave comments. Login now