diff options
author | Go MAEDA <maeda@farend.jp> | 2023-01-02 05:52:39 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2023-01-02 05:52:39 +0000 |
commit | 354ad625008316cc4347e8085bc93c2544d1c372 (patch) | |
tree | 556da81352e3535c084b8a58eb8c89f2270479e5 /lib | |
parent | 50f84c20b8235cd065fc30461e7b6957113def3c (diff) | |
download | redmine-354ad625008316cc4347e8085bc93c2544d1c372.tar.gz redmine-354ad625008316cc4347e8085bc93c2544d1c372.zip |
Merged r22012 from trunk to 5.0-stable (#37881).
git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@22018 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/wiki_formatting/macros.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/redmine/wiki_formatting/macros.rb b/lib/redmine/wiki_formatting/macros.rb index 83dc5dcc0..61218d93a 100644 --- a/lib/redmine/wiki_formatting/macros.rb +++ b/lib/redmine/wiki_formatting/macros.rb @@ -279,7 +279,8 @@ module Redmine size = size.to_i size = 200 unless size > 0 - attachments = obj.attachments if obj.respond_to?(:attachments) + container = obj.is_a?(Journal) ? obj.journalized : obj + attachments = container.attachments if container.respond_to?(:attachments) if (controller_name == 'previews' || action_name == 'preview') && @attachments.present? attachments = (attachments.to_a + @attachments).compact end |