数据库可插入null
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
a436571364
commit
a7ed38f03b
|
|
@ -933,7 +933,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
needAddList.Add(new ReadingTaskQuestionAnswer()
|
||||
{
|
||||
Answer = item.Answer,
|
||||
PCWGInterimAnswer=null,
|
||||
|
||||
ReadingQuestionTrialId = item.QuestionId,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,5 +38,5 @@ public class ReadingTaskQuestionAnswer : BaseAddAuditEntity
|
|||
/// <summary>
|
||||
/// PCWG 临时Answer
|
||||
/// </summary>
|
||||
public string? PCWGInterimAnswer { get; set; } = null;
|
||||
public string? PCWGInterimAnswer { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,12 +87,14 @@ public class AuditEntityInterceptor(IUserInfo _userInfo,
|
|||
//}
|
||||
|
||||
// 检查属性是否为string类型,并且值为null
|
||||
foreach (var property in entry.Properties.Where(t => t.Metadata.ClrType == typeof(string) && t.CurrentValue == null))
|
||||
|
||||
foreach (var property in entry.Properties.Where(t => t.Metadata.ClrType == typeof(string) && !t.Metadata.IsNullable && t.CurrentValue == null))
|
||||
{
|
||||
|
||||
property.CurrentValue = string.Empty;
|
||||
}
|
||||
|
||||
|
||||
switch (entry.State)
|
||||
{
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue