This commit is contained in:
2021-04-19 14:34:03 +00:00
parent 8d340b3f5f
commit 5bab86b3a0

View File

@@ -1130,19 +1130,19 @@ namespace AyaNova.Biz
} }
// //TEST TEST TEST // // //TEST TEST TEST
if (proposedObj.Notes.Contains("blah")) // if (proposedObj.Notes.Contains("blah"))
{ // {
; // ;
} // }
if (proposedObj.Notes != null && proposedObj.Notes.Contains("generalerror")) // if (proposedObj.Notes != null && proposedObj.Notes.Contains("generalerror"))
{ // {
AddError(ApiErrorCode.API_SERVER_ERROR, "generalerror", "Test general error"); // AddError(ApiErrorCode.API_SERVER_ERROR, "generalerror", "Test general error");
} // }
if (proposedObj.Notes != null && proposedObj.Notes.Contains("aytesterror")) // if (proposedObj.Notes != null && proposedObj.Notes.Contains("aytesterror"))
{ // {
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "Notes", "SAVE TEST ERROR"); // AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "Notes", "SAVE TEST ERROR");
} // }
//Check state if updatable right now //Check state if updatable right now
if (!isNew) if (!isNew)
@@ -1179,11 +1179,11 @@ namespace AyaNova.Biz
AddError(ApiErrorCode.NOT_FOUND, "id"); AddError(ApiErrorCode.NOT_FOUND, "id");
return; return;
} }
//TEST TEST TEST // //TEST TEST TEST
if (obj.Notes != null && obj.Notes.Contains("aytesterror")) // if (obj.Notes != null && obj.Notes.Contains("aytesterror"))
{ // {
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, $"Notes", "DELETE TEST ERROR"); // AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, $"Notes", "DELETE TEST ERROR");
} // }
//re-check rights here necessary due to traversal delete from Principle object //re-check rights here necessary due to traversal delete from Principle object
@@ -2935,11 +2935,11 @@ namespace AyaNova.Biz
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "WorkOrderItemId"); AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "WorkOrderItemId");
} }
// //TEST TEST TEST // // //TEST TEST TEST
if (proposedObj.EstimatedQuantity == 69) // if (proposedObj.EstimatedQuantity == 69)
{ // {
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, $"EstimatedQuantity", "◈◈ TEST SAVE ERROR ◈◈"); // AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, $"EstimatedQuantity", "◈◈ TEST SAVE ERROR ◈◈");
} // }
//Check state if updatable right now //Check state if updatable right now
@@ -2979,11 +2979,11 @@ namespace AyaNova.Biz
return; return;
} }
//TEST TEST TEST // //TEST TEST TEST
if (obj.EstimatedQuantity == 69) // if (obj.EstimatedQuantity == 69)
{ // {
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, $"EstimatedQuantity", "◈◈ TEST DELETE ERROR ◈◈"); // AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, $"EstimatedQuantity", "◈◈ TEST DELETE ERROR ◈◈");
} // }
//re-check rights here necessary due to traversal delete from Principle object //re-check rights here necessary due to traversal delete from Principle object
if (!Authorized.HasDeleteRole(CurrentUserRoles, AyaType.WorkOrderItemScheduledUser)) if (!Authorized.HasDeleteRole(CurrentUserRoles, AyaType.WorkOrderItemScheduledUser))