From 56979912c9bb041aac3fc5b88bf8275b743b0e28 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Fri, 16 Apr 2021 01:44:20 +0000 Subject: Merged r20946 from trunk to 4.2-stable (#34367). git-svn-id: http://svn.redmine.org/redmine/branches/4.2-stable@20947 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb b/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb index 472cd4dad..c1ae94066 100644 --- a/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb +++ b/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb @@ -107,7 +107,7 @@ module Redmine end next unless a a.description = attachment['description'].to_s.strip - if a.new_record? + if a.new_record? || a.invalid? unsaved_attachments << a else saved_attachments << a -- cgit v1.2.3