diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 0dfeda8..74fe25d 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