Fixes destroying attachments if the update fails. (r2875 r3523)

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3526 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis 2010-03-03 17:04:50 +00:00
parent 3c0c0a7677
commit f6d8752e44
1 changed files with 1 additions and 1 deletions

View File

@ -213,7 +213,7 @@ class IssuesController < ApplicationController
# Optimistic locking exception
flash.now[:error] = l(:notice_locking_conflict)
# Remove the previously added attachments if issue was not updated
attachments.each(&:destroy)
attachments[:files].each(&:destroy) if attachments[:files]
end
def reply