diff --git a/src/main/java/team1/be/seamless/service/TaskService.java b/src/main/java/team1/be/seamless/service/TaskService.java index bc3c39d..7617758 100644 --- a/src/main/java/team1/be/seamless/service/TaskService.java +++ b/src/main/java/team1/be/seamless/service/TaskService.java @@ -72,7 +72,6 @@ public Page getTaskList(Long projectId, String status, Stri taskEntities.getPageable(), taskEntities.getTotalElements() ); - } public ProjectProgress getProjectProgress(Long projectId, getList param) { @@ -83,11 +82,7 @@ public ProjectProgress getProjectProgress(Long projectId, getList param) { int sum = taskEntities.getContent().stream().mapToInt(TaskEntity::getProgress).sum(); int count = taskEntities.getContent().size(); - if (count == 0) { - throw new BaseHandler(HttpStatus.NOT_FOUND, "해당 프로젝트에 할당된 태스크가 존재하지 않습니다."); - } - - int average = sum / count; + int average = (count == 0) ? 0 : sum / count; String growthLevel; String description; @@ -135,7 +130,6 @@ public Page getMemberProgress(Long projectId, getList param) { if (param.getPage() * param.getSize() >= memberEntities.size()) { start = 0; - } else { start = param.getPage() * param.getSize(); }