Skip to content

Commit 7eab116

Browse files
authored
Merge pull request DefectDojo#3404 from mgm-sp/close-engagement-error
Fix Internal Server Error when closing engagements
2 parents 22841d6 + bba8d7a commit 7eab116

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dojo/jira_link/helper.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,8 +736,12 @@ def close_epic(eng, push_to_jira):
736736
if push_to_jira:
737737
try:
738738
jissue = get_jira_issue(eng)
739+
if jissue is None:
740+
logger.warn("JIRA close epic failed: no issue found")
741+
return False
742+
739743
req_url = jira_instance.url + '/rest/api/latest/issue/' + \
740-
j_issue.jira_id + '/transitions'
744+
jissue.jira_id + '/transitions'
741745
json_data = {'transition': {'id': jira_instance.close_status_key}}
742746
r = requests.post(
743747
url=req_url,

0 commit comments

Comments
 (0)