From aca6ed13fc256e65912b97e8091f300bdab7998f 2009-09-12 09:59:38 From: Jean-Philippe Lang Date: 2009-09-12 09:59:38 Subject: [PATCH] Fixed: issue attachments are saved even if the issue has been updated by another user (#3846). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2875 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 0dfeda8..74fe25d 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -211,6 +211,8 @@ class IssuesController < ApplicationController rescue ActiveRecord::StaleObjectError # Optimistic locking exception flash.now[:error] = l(:notice_locking_conflict) + # Remove the previously added attachments if issue was not updated + attachments.each(&:destroy) end def reply