Corrected the check for sattus ids in edit APIs
This commit is contained in:
parent
df999ed2c5
commit
3d37050dff
@ -3252,7 +3252,7 @@ namespace Marco.Pms.Services.Service
|
||||
return ApiResponse<object>.ErrorResponse("Requisition Status of same name already exists", "Requisition Status of same name already exists", 409);
|
||||
}
|
||||
|
||||
if (model.Id.HasValue && model.Id == id)
|
||||
if (model.Id.HasValue && model.Id != id)
|
||||
{
|
||||
_logger.LogWarning("User provided invalid information while updating Requisition Status");
|
||||
return ApiResponse<object>.ErrorResponse("Invalid information", "User provided invalid information", 400);
|
||||
@ -3478,7 +3478,7 @@ namespace Marco.Pms.Services.Service
|
||||
return ApiResponse<object>.ErrorResponse("Purchase Order Status of same name already exists", "Purchase Order Status of same name already exists", 409);
|
||||
}
|
||||
|
||||
if (model.Id.HasValue && model.Id == id)
|
||||
if (model.Id.HasValue && model.Id != id)
|
||||
{
|
||||
_logger.LogWarning("User provided invalid information while updating Purchase Order Status");
|
||||
return ApiResponse<object>.ErrorResponse("Invalid information", "User provided invalid information", 400);
|
||||
@ -3579,12 +3579,6 @@ namespace Marco.Pms.Services.Service
|
||||
|
||||
#endregion
|
||||
|
||||
#region =================================================================== Requisition Status APIs ===================================================================
|
||||
#endregion
|
||||
|
||||
#region =================================================================== Requisition Status APIs ===================================================================
|
||||
#endregion
|
||||
|
||||
#region =================================================================== Helper Function ===================================================================
|
||||
private static object ExceptionMapper(Exception ex)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user