Skip to content
Snippets Groups Projects
Unverified Commit b1a48e05 authored by trwnh's avatar trwnh Committed by GitHub
Browse files

Change Report category to "violation" if rule IDs are provided (#20137)

* Change Report category to "violation" if rule IDs are provided

* Fix LiteralAsCondition

* Add parentheses to conditional statement
parent c476dfc7
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ class ReportService < BaseService
@target_account = target_account
@status_ids = options.delete(:status_ids).presence || []
@comment = options.delete(:comment).presence || ''
@category = options.delete(:category).presence || 'other'
@category = options[:rule_ids].present? ? 'violation' : (options.delete(:category).presence || 'other')
@rule_ids = options.delete(:rule_ids).presence
@options = options
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment