Changed the check to check id model id and id from query is same
This commit is contained in:
parent
d1af0df27b
commit
7e90e4a703
@ -3857,7 +3857,7 @@ namespace Marco.Pms.Services.Service
|
||||
return ApiResponse<object>.ErrorResponse("Product Category Master of same name already exists", "Product Category Master 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 Product Category Master");
|
||||
return ApiResponse<object>.ErrorResponse("Invalid information", "User provided invalid information", 400);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user