From aca6ed13fc256e65912b97e8091f300bdab7998f Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 12 Sep 2009 09:59:38 +0000 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 --- app/controllers/issues_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 0dfeda8d5..74fe25d78 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 -- 2.39.5