fix unique为null问题
This commit is contained in:
@@ -78,11 +78,6 @@ public class DeviceSaveRequest : IValidatableObject
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
if (Id.HasValue)
|
||||
{
|
||||
UniqueNo = null;
|
||||
}
|
||||
|
||||
if (Type != DeviceTypeEnumType.Door && AsAttendance)
|
||||
{
|
||||
yield return new ValidationResult($"{DeviceTypeEnumType.Door.GetDescription()}才可设置作为考勤设备", new[] { nameof(AsAttendance) });
|
||||
|
||||
Reference in New Issue
Block a user