From f54492ae8e957888bb10e8947904490c95e47f48 Mon Sep 17 00:00:00 2001
From: rabbitali <shusheng.wen@outlook.com>
Date: Fri, 9 Jun 2023 17:19:52 +0800
Subject: [PATCH ] fix bug: API return 500 when create cve fix task without parameter auto_reboot
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 apollo/function/schema/task.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apollo/function/schema/task.py b/apollo/function/schema/task.py
index 5e8744b..ec6315e 100644
--- a/apollo/function/schema/task.py
+++ b/apollo/function/schema/task.py
@@ -88,7 +88,7 @@ class GenerateCveTaskSchema(Schema):
     task_name = fields.String(required=True, validate=lambda s: len(s) != 0)
     description = fields.String(
         required=True, validate=lambda s: 0 < len(s) <= 50)
-    auto_reboot = fields.Boolean(required=False, default=False)
+    auto_reboot = fields.Boolean(required=True, default=False)
     accepted = fields.Boolean(required=True, validate=validate.OneOf([True, False]))
     check_items = fields.String(required=False, validate=lambda s: 0 < len(s) <= 32)
     info = fields.List(fields.Nested(CveInfoDictSchema), required=True, validate=lambda s: len(s) > 0)
-- 

