This commit is contained in:
2023-01-08 19:57:50 +00:00
parent adc85f43cc
commit c561b790f5

View File

@@ -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;
}