This commit is contained in:
2021-01-23 17:06:09 +00:00
parent c07a116cf3
commit 786a43aa40
2 changed files with 4 additions and 3 deletions

View File

@@ -266,8 +266,9 @@ namespace AyaNova.Biz
//PartInventory record? //PartInventory record?
if (await ct.PartInventory.AnyAsync(m => m.PartWarehouseId == inObj.Id)) if (await ct.PartInventory.AnyAsync(m => m.PartWarehouseId == inObj.Id))
{ {
AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("PartInventoryTransaction")); AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("PartInventoryTransaction"));
} }
} }

View File

@@ -831,8 +831,8 @@ namespace AyaNova.Biz
//if (await ct.Event.Select(z => z).Where(z => z.UserId == inObj.Id).Count() > 0) //if (await ct.Event.Select(z => z).Where(z => z.UserId == inObj.Id).Count() > 0)
if (await ct.Event.AnyAsync(z => z.UserId == inObj.Id)) if (await ct.Event.AnyAsync(z => z.UserId == inObj.Id))
{ {
//todo: Hold up, shouldt this be: AddError(ApiErrorCode.VALIDATION_REFERENTIAL_INTEGRITY, "generalerror", await Translate("NotifySubscription")); //Theres no more specific error to show for this
AddError(ApiErrorCode.INVALID_OPERATION, null, await Translate("ErrorDBForeignKeyViolation")); AddError(ApiErrorCode.INVALID_OPERATION, "generalerror", await Translate("ErrorDBForeignKeyViolation"));
return; return;
} }