This commit is contained in:
@@ -303,12 +303,15 @@ namespace AyaNova.Biz
|
||||
|
||||
|
||||
//Referential integrity error
|
||||
if (await ct.User.AnyAsync(z => z.CustomerId == inObj.Id) == true)
|
||||
{
|
||||
//Note: errorbox will ensure it appears in the general errror box and not field specific
|
||||
//the translation key is to indicate what the linked object is that is causing the error
|
||||
AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "errorbox", "LT:Contact");
|
||||
}
|
||||
//Just an example
|
||||
// if (await ct.User.AnyAsync(z => z.CustomerId == inObj.Id) == true)
|
||||
// {
|
||||
// //Note: errorbox will ensure it appears in the general errror box and not field specific
|
||||
// //the translation key is to indicate what the linked object is that is causing the error
|
||||
// AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "errorbox", "LT:Contact");
|
||||
// }
|
||||
|
||||
//return await Task.CompletedTask;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user