From f7458b1dc8494bb1f62510a5cea2f8b2672f01f1 Mon Sep 17 00:00:00 2001 From: hblankenship Date: Fri, 20 Dec 2024 08:07:09 -0600 Subject: [PATCH 1/2] Allow for None for Verified and Active (just like the UI) --- dojo/api_v2/serializers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dojo/api_v2/serializers.py b/dojo/api_v2/serializers.py index 5cdc2db4d88..921a6d0e33d 100644 --- a/dojo/api_v2/serializers.py +++ b/dojo/api_v2/serializers.py @@ -2087,10 +2087,10 @@ class CommonImportScanSerializer(serializers.Serializer): help_text="Minimum severity level to be imported", ) active = serializers.BooleanField( - help_text="Override the active setting from the tool.", + help_text="Override the active setting from the tool.", required=False, ) verified = serializers.BooleanField( - help_text="Override the verified setting from the tool.", + help_text="Override the verified setting from the tool.", required=False, ) # TODO: why do we allow only existing endpoints? From 1a9131896fd3c92e9939de76297a6cfb58ad93f4 Mon Sep 17 00:00:00 2001 From: hblankenship Date: Fri, 20 Dec 2024 08:15:42 -0600 Subject: [PATCH 2/2] update help text too --- dojo/api_v2/serializers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dojo/api_v2/serializers.py b/dojo/api_v2/serializers.py index 921a6d0e33d..9ee4ce457a6 100644 --- a/dojo/api_v2/serializers.py +++ b/dojo/api_v2/serializers.py @@ -2087,10 +2087,10 @@ class CommonImportScanSerializer(serializers.Serializer): help_text="Minimum severity level to be imported", ) active = serializers.BooleanField( - help_text="Override the active setting from the tool.", required=False, + help_text="Force findings to be active/inactive or default to the original tool (None)", required=False, ) verified = serializers.BooleanField( - help_text="Override the verified setting from the tool.", required=False, + help_text="Force findings to be verified/not verified or default to the original tool (None)", required=False, ) # TODO: why do we allow only existing endpoints?