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 ...@@ -62,7 +62,7 @@ module EE
errors << render_vulnerability_link_alert(error) errors << render_vulnerability_link_alert(error)
end end
flash[:alert] = errors.join('<br\>').html_safe flash[:alert] = errors.join('<br\>').html_safe unless errors.blank?
end end
def vulnerability 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 ...@@ -127,6 +127,10 @@ RSpec.describe Projects::IssuesController do
expect(issue.confidential).to be false expect(issue.confidential).to be false
end 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 context 'when vulnerability already has a linked issue' do
render_views 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