Checkpoint: Added docs, improved ExchangeEntity
This commit is contained in:
@ -69,9 +69,8 @@ public class ExchangeController extends TokenBasedController{
|
||||
|
||||
final Assignment assignmentInstance = assignment.get();
|
||||
final Groups groupInstance = group.get();
|
||||
final Optional<Exchange> exchangeInstance = this.exchangeService.checkForExchange(assignmentInstance, groupInstance);
|
||||
|
||||
if(!(assignmentInstance.getCommision().getCommisionOwner().getId() == asker.getId() && assignmentInstance.isAccepted() && exchangeInstance.isEmpty())){
|
||||
if(!(assignmentInstance.getCommision().getCommisionOwner().getId().equals(asker.getId()) && assignmentInstance.isAccepted())){
|
||||
return new ResponseEntity<>("Some of problems appeared. Check if you have access to given assignment and if it is accepted or the exchange has not been already added.", HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user