From 8fa6887efd95ac7234149ee1048f330490caa1ce Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 10 May 2022 11:09:29 +0200 Subject: [PATCH] Fix warning an account outside of a report closing all reports for that account --- app/models/admin/account_action.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/admin/account_action.rb b/app/models/admin/account_action.rb index 2379758801..aed3bc0c7d 100644 --- a/app/models/admin/account_action.rb +++ b/app/models/admin/account_action.rb @@ -164,8 +164,8 @@ class Admin::AccountAction def reports @reports ||= begin - if type == 'none' && with_report? - [report] + if type == 'none' + with_report? ? [report] : [] else Report.where(target_account: target_account).unresolved end