Skip to content

Commit f5146df

Browse files
authored
Merge pull request DefectDojo#1502 from Maffooch/jira_cols
Correct overlooked error in DefectDojo#1498
2 parents bc5eddf + 0fd5fee commit f5146df

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dojo/finding/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,11 @@ def open_findings(request, pid=None, eid=None, view=None):
121121
if pid:
122122
show_product_column = False
123123
product_tab = Product_Tab(pid, title="Findings", tab="findings")
124-
jira_config = JIRA_PKey.objects.filter(product=pid)[0].conf_id
124+
jira_config = JIRA_PKey.objects.filter(product=pid).first()
125125
elif eid and pid_local:
126126
show_product_column = False
127127
product_tab = Product_Tab(pid_local, title=eng.name, tab="engagements")
128-
jira_config = JIRA_PKey.objects.filter(product__engagement=eid)[0].conf_id
128+
jira_config = JIRA_PKey.objects.filter(product__engagement=eid).first()
129129
else:
130130
add_breadcrumb(title="Findings", top_level=not len(request.GET), request=request)
131131
# raise Exception('Stop')

dojo/test/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def view_test(request, tid):
7070

7171
product_tab = Product_Tab(prod.id, title="Test", tab="engagements")
7272
product_tab.setEngagement(test.engagement)
73-
jira_config = JIRA_PKey.objects.filter(product=prod.id)[0].conf_id
73+
jira_config = JIRA_PKey.objects.filter(product=prod.id).first()
7474
return render(request, 'dojo/view_test.html',
7575
{'test': test,
7676
'product_tab': product_tab,

0 commit comments

Comments
 (0)