From 081e4426f8b4f5377afdd6e68e135a3aded93df1 Mon Sep 17 00:00:00 2001 From: Claire Date: Sun, 16 Jan 2022 20:57:37 +0100 Subject: [PATCH] Fix admin interface crash when displaying deleted user (#17301) --- app/helpers/admin/dashboard_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/admin/dashboard_helper.rb b/app/helpers/admin/dashboard_helper.rb index d4a30b97eb..c21d413419 100644 --- a/app/helpers/admin/dashboard_helper.rb +++ b/app/helpers/admin/dashboard_helper.rb @@ -2,7 +2,7 @@ module Admin::DashboardHelper def relevant_account_ip(account, ip_query) - ips = account.user.ips.to_a + ips = account.user.present? ? account.user.ips.to_a : [] matched_ip = begin ip_query_addr = IPAddr.new(ip_query)