Open GrowlingM1ke opened 5 years ago
The above changes have implemented on the MLBranch using the following code in
boolean hasOldEvent = false;
for (StudentInEvent e : student.getEvents()) {
if (e.getEvent().getId() == oldEvent.getId()) {
hasOldEvent = true;
break;
}
}
if (!hasOldEvent) {
return ResponseMove.NOT_IN_OLD_EVENT;
}
Until the fix is not merged into master the issue will remain open.
Currently there is an issue where the student can move from an old event EVEN if it is not part of that old event, there is no check. The following should be done:
1). In moveStudentToNewEvent method there should be a check to see if the student has the oldEvent in its list of events and return to the proper response code (See point 2).
2). Update the ResponseMove enum to contain NOT_IN_OLD_EVENT