Commit f6d8752e authored by Eric Davis's avatar Eric Davis

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
parent 3c0c0a76
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment