Commit dd802048 authored by Mehmet Emin INAC's avatar Mehmet Emin INAC

Raise exception if can not mark the project as vulnerable

parent a9d91189
......@@ -11,7 +11,7 @@ module Security
def execute
store_reports
mark_project_as_vulnerable
mark_project_as_vulnerable!
errors.any? ? error(full_errors) : success
end
......@@ -29,8 +29,8 @@ module Security
end
end
def mark_project_as_vulnerable
project.project_setting.update(has_vulnerabilities: true)
def mark_project_as_vulnerable!
project.project_setting.update!(has_vulnerabilities: true)
end
def full_errors
......
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