From e74cc0b923b06b34f06a9971f9c674d9d748ed5d Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Thu, 1 Apr 2021 15:25:40 +0000 Subject: [PATCH] Fix detach attachments when a conflict occurs (#29914, #32923). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Patch by Pavel Rosický. git-svn-id: http://svn.redmine.org/redmine/trunk@20894 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/issues_controller.rb | 1 + 1 file changed, 1 insertion(+) 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 -- 2.39.5