Skip to content

Commit b8fa7a4

Browse files
authored
The Jira environment is built using only existing endpoints when built for a group of findings (#10428)
Co-authored-by: Camilo Cota <ccota@redhat.com>
1 parent 50327a7 commit b8fa7a4

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

dojo/jira_link/helper.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,13 @@ def jira_environment(obj):
618618
if isinstance(obj, Finding):
619619
return "\n".join([str(endpoint) for endpoint in obj.endpoints.all()])
620620
elif isinstance(obj, Finding_Group):
621-
return "\n".join([jira_environment(finding) for finding in obj.findings.all()])
621+
envs = [
622+
jira_environment(finding)
623+
for finding in obj.findings.all()
624+
]
625+
626+
jira_environments = [env for env in envs if env]
627+
return "\n".join(jira_environments)
622628
else:
623629
return ''
624630

0 commit comments

Comments
 (0)