From fa03bdc3790e6da511dc51abfd899c031e15a0ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=82=9C=E7=BF=94?= <2307953404@qq.com> Date: Fri, 14 Feb 2025 17:08:59 +0800 Subject: [PATCH] 1 --- asg_form/Controllers/news.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asg_form/Controllers/news.cs b/asg_form/Controllers/news.cs index 9119668..2050c2a 100644 --- a/asg_form/Controllers/news.cs +++ b/asg_form/Controllers/news.cs @@ -173,7 +173,7 @@ namespace asg_form.Controllers qwq.msg=req_News.msg; qwq.Title=req_News.Title; qwq.FormName = user.UserName; - qwq.Type = req_News.Type; + qwq.Type = req_News.Type==null?"1": qwq.Type; ctx.SaveChanges(); } catch (Exception ex)