Skip to content

Commit

Permalink
Update CreateScheduleCommandHandler.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
PhucNghi176 authored Oct 25, 2024
1 parent aa492f1 commit 856a461
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public async Task<Result> Handle(Command.CreateScheduleCommand request, Cancella
return Result.Failure(new Error("400", "User is not exist !"));
}

var group = await _groupRepository.FindSingleAsync(x => x.LeaderId.Equals(user.Id), cancellationToken);
var group = await _groupRepository.FindSingleAsync(x => x.LeaderId.Equals(user.Id) && x.ProjectId.Equals(request.ProjectId), cancellationToken);

if (group == null || group.IsDeleted)
{
Expand Down Expand Up @@ -86,4 +86,4 @@ public async Task<Result> Handle(Command.CreateScheduleCommand request, Cancella

return Result.Success("Booking Schedule Successfully !");
}
}
}

0 comments on commit 856a461

Please sign in to comment.