From 0e6cb59f2f51ad6831188b47fd9e5c6827e9ff91 Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Tue, 13 Oct 2020 12:06:57 -0500 Subject: Add missing safe navigation operator --- app/models/status.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/status.rb b/app/models/status.rb index 7f4066036..50a558ed1 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -573,7 +573,7 @@ class Status < ApplicationRecord end if target_account.id != account&.id && target_account&.user&.max_history_public.present? - history_limit = account.following?(target_account) ? target_account.user.max_history_private : target_account.user.max_history_public + history_limit = account&.following?(target_account) ? target_account.user.max_history_private : target_account.user.max_history_public query = query.where('statuses.updated_at >= ?', history_limit.weeks.ago) if history_limit.positive? end -- cgit