Skip to content

Commit 77c8a85

Browse files
authored
Merge pull request DefectDojo#674 from benghaun/bugfix
bugfix for templated findings and empty component handling
2 parents 99ccbbd + c56ffba commit 77c8a85

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

dojo/test/views.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,8 @@ def add_temp_finding(request, tid, fid):
320320
new_finding.save()
321321
if 'jiraform-push_to_jira' in request.POST:
322322
jform = JIRAFindingForm(request.POST, prefix='jiraform', enabled=True)
323-
add_issue_task.delay(new_finding, jform.cleaned_data.get('push_to_jira'))
323+
if jform.is_valid():
324+
add_issue_task.delay(new_finding, jform.cleaned_data.get('push_to_jira'))
324325
messages.add_message(request,
325326
messages.SUCCESS,
326327
'Finding from template added successfully.',

dojo/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ def update_issue(find, old_status, push_to_jira):
10771077
log_jira_alert(
10781078
"Component not updated, exists in Jira already. Update from Jira instead.",
10791079
find)
1080-
else:
1080+
elif jpkey.component:
10811081
# Add component to the Jira issue
10821082
component = [
10831083
{

0 commit comments

Comments
 (0)