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
This commit is contained in:
Jean-Philippe Lang 2009-09-12 09:59:38 +00:00
parent 8e3222195b
commit aca6ed13fc
1 changed files with 2 additions and 0 deletions

View 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