r26 - trunk/jredmine-client/src/main/redmine/jredmine/app/controllers
Author: tchemit Date: 2009-10-30 18:56:36 +0100 (Fri, 30 Oct 2009) New Revision: 26 Modified: trunk/jredmine-client/src/main/redmine/jredmine/app/controllers/jredmine_controller.rb Log: try to detetc if file was upload Modified: trunk/jredmine-client/src/main/redmine/jredmine/app/controllers/jredmine_controller.rb =================================================================== --- trunk/jredmine-client/src/main/redmine/jredmine/app/controllers/jredmine_controller.rb 2009-10-30 11:18:10 UTC (rev 25) +++ trunk/jredmine-client/src/main/redmine/jredmine/app/controllers/jredmine_controller.rb 2009-10-30 17:56:36 UTC (rev 26) @@ -283,10 +283,14 @@ :description => attachment['description'].to_s.strip, :author => User.current) end - if a.save && Setting.notified_events.include?('file_added') - array =[] - array << a - Mailer.deliver_attachments_added(array) + if a.save + if Setting.notified_events.include?('file_added') + array =[] + array << a + Mailer.deliver_attachments_added(array) + end + else + render_status 505, "Could not save the file " + a end render_result a end
participants (1)
-
tchemit@users.nuiton.org