about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-04-17 19:54:58 +0200
committerGitHub <noreply@github.com>2020-04-17 19:54:58 +0200
commit89077fb65713ece348fdbee1986d1593383ba801 (patch)
tree833daadbe2a18127313861250e96e2f011f8854c
parentd18d6c29f38cb9830b900ed1e7068518f41b9b26 (diff)
Fix admin actions log crash when displaying updates of deleted announcements (#13489)
Fixes #13487
-rw-r--r--app/helpers/admin/action_logs_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/admin/action_logs_helper.rb b/app/helpers/admin/action_logs_helper.rb
index 88d6e4580..8e398c3b2 100644
--- a/app/helpers/admin/action_logs_helper.rb
+++ b/app/helpers/admin/action_logs_helper.rb
@@ -47,7 +47,7 @@ module Admin::ActionLogsHelper
         I18n.t('admin.action_logs.deleted_status')
       end
     when 'Announcement'
-      truncate(attributes['text'])
+      truncate(attributes['text'].is_a?(Array) ? attributes['text'].last : attributes['text'])
     end
   end
 end