2nd tour looks if assignment is accepted

This commit is contained in:
Filip Izydorczyk 2021-01-14 15:05:41 +01:00
parent fafd94f469
commit 28e872ce3a

View File

@ -91,6 +91,7 @@ public class AssignmentService {
if (com.isPresent()) {
final List<Assignment> assignments = this.getCommisionAssignments(com.get());
assignments.forEach(a -> {
if (a.isAccepted() == false) {
final Groups group = a.getGroup();
if (group.getCapacity() > group.getRegisteredStudents().size()) {
e.claimGroup(group);
@ -98,6 +99,7 @@ public class AssignmentService {
} else {
removed.add(group);
}
}
});
}
this.userService.save(e);