Changed the check to check id model id and id from query is same

This commit is contained in:
ashutosh.nehete 2025-10-29 11:37:09 +05:30
parent d1af0df27b
commit 7e90e4a703

View File

@ -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);