From 0232a7f2eac96985dbb994064481e819fd22b83f Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Tue, 19 Apr 2022 15:49:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Infra.EFCore/Repository/Repository.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Infra.EFCore/Repository/Repository.cs b/IRaCIS.Core.Infra.EFCore/Repository/Repository.cs index 53fea6784..40dabcdcc 100644 --- a/IRaCIS.Core.Infra.EFCore/Repository/Repository.cs +++ b/IRaCIS.Core.Infra.EFCore/Repository/Repository.cs @@ -164,6 +164,10 @@ namespace IRaCIS.Core.Infra.EFCore foreach (var item in JsonData.Keys) { + if (JsonData[item] == null) + { + continue; + } if (JsonData[item].ToString().ToLower() == "true".ToLower()) { JsonData[item] = "是"; @@ -192,7 +196,7 @@ namespace IRaCIS.Core.Infra.EFCore /// private bool IsNullOrEmpty(object value) { - if (value==null || value.ToString() == string.Empty) + if (value == null || value.ToString() == string.Empty) { return true; }