]> source.dussan.org Git - redmine.git/commitdiff
Fixed: issue attachments are saved even if the issue has been updated by another...
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 12 Sep 2009 09:59:38 +0000 (09:59 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 12 Sep 2009 09:59:38 +0000 (09:59 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2875 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/issues_controller.rb

index 0dfeda8d5f3755401f67d954b9f7e68009ec2fdd..74fe25d78ee5ecfb5e6baaba1de3f7fb09d963af 100644 (file)
@@ -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