Project_Branch_Management #155

Merged
ashutosh.nehete merged 17 commits from Project_Branch_Management into main 2025-11-25 06:49:19 +00:00
Showing only changes of commit a31266ee4a - Show all commits

View File

@ -808,9 +808,9 @@ namespace Marco.Pms.Services.Service
public async Task<ApiResponse<object>> UpdateProjectBranchAsync(Guid id, ProjectBranchDto model, Employee loggedInEmployee, Guid tenantId)
{
// Validate ID consistency between route parameter and payload DTO
if (model.Id.HasValue && model.Id != id)
if (!model.Id.HasValue && model.Id != id)
{
_logger.LogWarning("ID mismatch: Route ID {RouteId} != Payload ID {PayloadId}", id, model.Id);
_logger.LogWarning("ID mismatch: Route ID {RouteId} != Payload ID {PayloadId}", id, model.Id ?? Guid.Empty);
return ApiResponse<object>.ErrorResponse("ID mismatch between route and payload", "The ID provided in the route does not match the payload.", 400);
}