Update 'restservice/src/main/java/com/plannaplan/controllers/ExchangeController.java'

posiible mistake in course checking
This commit is contained in:
filipizydorczyk 2021-01-19 23:45:54 +01:00
parent c177314419
commit 65ea502619

View File

@ -89,7 +89,7 @@ public class ExchangeController extends TokenBasedController {
final Groups groupInstance = group.get();
if (assignmentInstance.getGroup().getCourseId() != null
&& assignmentInstance.getGroup().getCourseId().getId() != groupInstance.getCourseId().getId()) {
&& ! assignmentInstance.getGroup().getCourseId().getId().equals(groupInstance.getCourseId().getId())) {
return new ResponseEntity<>("You can performe exchange only within one course.", HttpStatus.BAD_REQUEST);
}