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