Commit 2416d3fd authored by Jonathan Schafer's avatar Jonathan Schafer Committed by Alex Kalderimis

Fix blank alert field with vuln issue

parent 9c266113
......@@ -62,7 +62,7 @@ module EE
errors << render_vulnerability_link_alert(error)
end
flash[:alert] = errors.join('<br\>').html_safe
flash[:alert] = errors.join('<br\>').html_safe unless errors.blank?
end
def vulnerability
......
---
title: Fix blank alert field when creating an issue from a vulnerability
merge_request: 53656
author:
type: fixed
......@@ -127,6 +127,10 @@ RSpec.describe Projects::IssuesController do
expect(issue.confidential).to be false
end
it 'does not show an error message' do
expect(flash[:alert]).to be_nil
end
context 'when vulnerability already has a linked issue' do
render_views
......
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