From 66bd7f507f9bbdba9b8782535b4d6554d4ea67b5 Mon Sep 17 00:00:00 2001 From: Alexander Parrill Date: Fri, 12 Apr 2024 10:17:39 -0400 Subject: [PATCH] Fix findings added by "Add Blank Finding" not having initial extra fields --- ghostwriter/api/views.py | 2 -- ghostwriter/reporting/views.py | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ghostwriter/api/views.py b/ghostwriter/api/views.py index d7bec80d8..b41d2ec36 100644 --- a/ghostwriter/api/views.py +++ b/ghostwriter/api/views.py @@ -764,8 +764,6 @@ def post(self, request, *args, **kwargs): del finding_dict["tags"] del finding_dict["tagged_items"] - del finding_dict["extra_fields"] - report_link = ReportFindingLink( report=report, assigned_to=self.user_obj, diff --git a/ghostwriter/reporting/views.py b/ghostwriter/reporting/views.py index e43eee3b8..841302877 100644 --- a/ghostwriter/reporting/views.py +++ b/ghostwriter/reporting/views.py @@ -928,6 +928,7 @@ def get(self, *args, **kwargs): assigned_to=self.request.user, position=get_position(obj.id, self.severity), added_as_blank=True, + extra_fields=ExtraFieldSpec.initial_json(Finding), ) report_link.save()