Commit ea3748fc authored by rossfuhrman's avatar rossfuhrman

Check feature flag when deciding occurrence state

Add check of :first_class_vulnerabilities feature flag to prevent
unnecessary attempts to load vulnerabilities to determine state of
occurrence.
parent 728c47d8
......@@ -136,6 +136,7 @@ module Vulnerabilities
def state
return 'dismissed' if dismissal_feedback.present?
return 'opened' unless Feature.enabled?(:first_class_vulnerabilities, project)
if vulnerability.nil?
'opened'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment