修改导表

IRC_NewDev
hang 2024-04-08 11:16:55 +08:00
parent e98d80eea6
commit 5b89343192
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ namespace IRaCIS.Core.Infrastructure.Extention
object propertyValue = property.GetValue(obj);
// 如果属性的类型是枚举,将其值保留为整数
if (property.PropertyType.IsEnum || Nullable.GetUnderlyingType(property.PropertyType)?.IsEnum == true)
if (property.PropertyType.IsEnum || (Nullable.GetUnderlyingType(property.PropertyType)?.IsEnum == true && propertyValue!=null) )
{
dictionary.Add(propertyName, (int)propertyValue);
}