From c561b790f56c36b67828dcb2fa593ed76b82a0cb Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Sun, 8 Jan 2023 19:57:50 +0000 Subject: [PATCH] --- server/biz/LicenseBiz.cs | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/server/biz/LicenseBiz.cs b/server/biz/LicenseBiz.cs index f4d9356..8c8f598 100644 --- a/server/biz/LicenseBiz.cs +++ b/server/biz/LicenseBiz.cs @@ -485,7 +485,7 @@ namespace Sockeye.Biz AddError(ApiErrorCode.NOT_FOUND); return false; } - await ValidateCanDeleteAsync(dbObject); + ValidateCanDeleteAsync(dbObject); if (HasErrors) return false; @@ -655,6 +655,29 @@ namespace Sockeye.Biz return; } + if (proposedObj.WBI && proposedObj.WBIExpires == null) + AddError(ApiErrorCode.VALIDATION_REQUIRED, "WBIExpires"); + if (proposedObj.MBI && proposedObj.MBIExpires == null) + AddError(ApiErrorCode.VALIDATION_REQUIRED, "MBIExpires"); + if (proposedObj.RI && proposedObj.RIExpires == null) + AddError(ApiErrorCode.VALIDATION_REQUIRED, "RIExpires"); + if (proposedObj.QBI && proposedObj.QBIExpires == null) + AddError(ApiErrorCode.VALIDATION_REQUIRED, "QBIExpires"); + if (proposedObj.QBOI && proposedObj.QBOIExpires == null) + AddError(ApiErrorCode.VALIDATION_REQUIRED, "QBOIExpires"); + if (proposedObj.PTI && proposedObj.PTIExpires == null) + AddError(ApiErrorCode.VALIDATION_REQUIRED, "PTIExpires"); + if (proposedObj.QuickNotification && proposedObj.QuickNotificationExpires == null) + AddError(ApiErrorCode.VALIDATION_REQUIRED, "QuickNotificationExpires"); + if (proposedObj.ExportToXLS && proposedObj.ExportToXLSExpires == null) + AddError(ApiErrorCode.VALIDATION_REQUIRED, "ExportToXLSExpires"); + if (proposedObj.OutlookSchedule && proposedObj.OutlookScheduleExpires == null) + AddError(ApiErrorCode.VALIDATION_REQUIRED, "OutlookScheduleExpires"); + if (proposedObj.OLI && proposedObj.OLIExpires == null) + AddError(ApiErrorCode.VALIDATION_REQUIRED, "OLIExpires"); + if (proposedObj.ImportExportCSVDuplicate && proposedObj.ImportExportCSVDuplicateExpires == null) + AddError(ApiErrorCode.VALIDATION_REQUIRED, "ImportExportCSVDuplicateExpires"); + } break; }