From e301d4fdd37ab2f0ace7f9f40ce2735ced0fa929 Mon Sep 17 00:00:00 2001 From: Scott Venkataraman Date: Tue, 7 Apr 2026 14:45:46 -0400 Subject: [PATCH] Add exclusion pattern for bookmarks in reported_work_id of abuse_report.rb file --- app/models/abuse_report.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/models/abuse_report.rb b/app/models/abuse_report.rb index 7fa90f9e0c..7f128cfc26 100644 --- a/app/models/abuse_report.rb +++ b/app/models/abuse_report.rb @@ -182,10 +182,11 @@ def creator_ids end end - # ID of the reported work, unless the report is about comment(s) on the work + # ID of the reported work, unless the report is about comment(s) or bookmark(s) on the work def reported_work_id comments = url[%r{/comments/}, 0] - url[%r{/works/(\d+)}, 1] if comments.nil? + bookmarks = url[%r{/bookmarks}, 0] + url[%r{/works/(\d+)}, 1] if comments.nil? && bookmarks.nil? end # ID of the reported comment