aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/srtgui/views.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/srtgui/views.py b/lib/srtgui/views.py
index 079fc670..7fdfad98 100644
--- a/lib/srtgui/views.py
+++ b/lib/srtgui/views.py
@@ -1398,7 +1398,7 @@ def _create_defect(investigation,reason,defect_reason,domain_components,affected
d_name = "DEFECT-%s-%d" % (investigation.product.get_defect_tag('key'),index)
d_url = "%s%s" % (SrtSetting.objects.get(name='SRTOOL_DEFECT_URLBASE').value,d_name)
# create new defect entry
- d = Defect.objects.create(name=d_name)
+ d = Defect.objects.create(name=d_name,product=investigation.product)
d.summary = summary
d.priority = investigation.priority
d.status = Defect.DEFECT_STATUS_OPEN
@@ -1406,7 +1406,6 @@ def _create_defect(investigation,reason,defect_reason,domain_components,affected
d.srt_priority = investigation.priority
d.srt_status = Defect.VULNERABLE
d.srt_outcome = Defect.OPEN
- d.product = investigation.product
d.url = d_url
d.save()
_log("NEW_DEFECT:%s|%s|%s|%s" % (d.name,summary,components,priority))
@@ -1643,9 +1642,7 @@ def xhr_triage_commit(request):
if not investigation:
i_name = Investigation.new_investigation_name()
- investigation = Investigation.objects.create(name=i_name)
- investigation.vulnerability = vulnerability
- investigation.product = product
+ investigation = Investigation.objects.create(name=i_name,product=product,vulnerability = vulnerability)
investigation.priority = cve_priority
investigation.outcome = Investigation.OPEN
# Check to see if product is active