From 89077fb65713ece348fdbee1986d1593383ba801 Mon Sep 17 00:00:00 2001 From: ThibG Date: Fri, 17 Apr 2020 19:54:58 +0200 Subject: Fix admin actions log crash when displaying updates of deleted announcements (#13489) Fixes #13487 --- app/helpers/admin/action_logs_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit