From 9ce914cc897d2b1100cee8cb6d792a2283d877ec Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 6 Feb 2024 10:35:36 +0100 Subject: [PATCH] Fix report reason selector in moderation interface not unselecting rules when changing category (#29026) --- .../mastodon/components/admin/ReportReasonSelector.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/mastodon/components/admin/ReportReasonSelector.jsx b/app/javascript/mastodon/components/admin/ReportReasonSelector.jsx index ecce92b30..90f4334a6 100644 --- a/app/javascript/mastodon/components/admin/ReportReasonSelector.jsx +++ b/app/javascript/mastodon/components/admin/ReportReasonSelector.jsx @@ -124,7 +124,7 @@ class ReportReasonSelector extends PureComponent { api().put(`/api/v1/admin/reports/${id}`, { category, - rule_ids, + rule_ids: category === 'violation' ? rule_ids : [], }).catch(err => { console.error(err); });