From: Go MAEDA Date: Thu, 1 Apr 2021 15:25:40 +0000 (+0000) Subject: Fix detach attachments when a conflict occurs (#29914, #32923). X-Git-Tag: 5.0.0~465 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e74cc0b923b06b34f06a9971f9c674d9d748ed5d;p=redmine.git Fix detach attachments when a conflict occurs (#29914, #32923). Patch by Pavel Rosický. git-svn-id: http://svn.redmine.org/redmine/trunk@20894 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index f45d9bf06..c994862e1 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -189,6 +189,7 @@ class IssuesController < ApplicationController begin saved = save_issue_with_child_records rescue ActiveRecord::StaleObjectError + @issue.detach_saved_attachments @conflict = true if params[:last_journal_id] @conflict_journals = @issue.journals_after(params[:last_journal_id]).to_a