summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-04-16 01:44:20 +0000
committerGo MAEDA <maeda@farend.jp>2021-04-16 01:44:20 +0000
commit56979912c9bb041aac3fc5b88bf8275b743b0e28 (patch)
tree3431d060539464b41620617432b6ed9242ba7075 /lib
parent361da73fa1675c4c5818c42ceee8858dfacdc86b (diff)
downloadredmine-56979912c9bb041aac3fc5b88bf8275b743b0e28.tar.gz
redmine-56979912c9bb041aac3fc5b88bf8275b743b0e28.zip
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
Diffstat (limited to 'lib')
-rw-r--r--lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb2
1 files changed, 1 insertions, 1 deletions
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