brigning down group tpes

This commit is contained in:
Filip Izydorczyk
2021-01-19 10:44:35 +01:00
parent 06fb41b5dd
commit 6a4ea45900
7 changed files with 99 additions and 15 deletions

View File

@ -68,7 +68,7 @@ public class CoursesController {
final HashMap<Long, Integer> ammounts = this.groupService.getTakenPlaces(course.getGroups());
course.getGroups().stream().forEach(group -> {
if (group.getType() == GroupType.CLASS) {
if (GroupType.isLectureOrClass(group.getType()) == GroupType.CLASS) {
classes.add(new GroupWithCapacityResponse(group, ammounts.get(group.getId())));
} else {
lectures.add(new GroupWithCapacityResponse(group, ammounts.get(group.getId())));