From de4cff4a0f8b770f21710b65ff35ad1c98371d89 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Fri, 21 Jun 2024 11:27:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E9=A1=B9=E5=8F=AA=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E6=97=B6=EF=BC=8C=E6=8F=90=E7=A4=BA=E9=80=89?= =?UTF-8?q?=E9=A1=B9=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tiobon.Core.Services/Ghre/Ghre_QuestionServices.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tiobon.Core.Services/Ghre/Ghre_QuestionServices.cs b/Tiobon.Core.Services/Ghre/Ghre_QuestionServices.cs index 46cad571..e865c09b 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_QuestionServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_QuestionServices.cs @@ -479,7 +479,7 @@ public class Ghre_QuestionServices : BaseServices string.IsNullOrWhiteSpace(b.AnswerContent)).Any()) + if (insertAnswers.Where(b => string.IsNullOrWhiteSpace(b.AnswerContent) && string.IsNullOrWhiteSpace(b.ImageUrl)).Any()) throw new Exception(insert.QuestionType == "ShortAnswer" ? "关键词存在空值!" : "答案选项存在空值!"); if (!insertAnswers.Where(b => b.IsCorrect == true).Any()) throw new Exception(insert.QuestionType == "ShortAnswer" ? "关键词未填写!" : "正确答案未标记!"); @@ -570,7 +570,7 @@ public class Ghre_QuestionServices : BaseServices string.IsNullOrWhiteSpace(b.AnswerContent)).Any()) + if (insertAnswers.Where(b => string.IsNullOrWhiteSpace(b.AnswerContent) && string.IsNullOrWhiteSpace(b.ImageUrl)).Any()) throw new Exception(edit.QuestionType == "ShortAnswer" ? "关键词存在空值!" : "答案选项存在空值!"); if (!insertAnswers.Where(b => b.IsCorrect == true).Any()) throw new Exception(edit.QuestionType == "ShortAnswer" ? "关键词未填写!" : "正确答案未标记!");