Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: April Shen <april.tuesday@gmail.com>
  • Loading branch information
tcezard and apriltuesday authored Oct 3, 2024
1 parent 6db78ce commit 6a8fd5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,9 @@ public ResponseEntity<?> markSubmissionUploaded(@RequestHeader("Authorization")
}

String submissionStatus = submissionService.getSubmissionStatus(submissionId);
System.out.println(submissionStatus);
if (! Objects.equals(submissionStatus, SubmissionStatus.OPEN.toString())){
return new ResponseEntity<>(
"Submission " + submissionId + "is not in status " + SubmissionStatus.OPEN +
"Submission " + submissionId + " is not in status " + SubmissionStatus.OPEN +
". It cannot be marked as " + SubmissionStatus.UPLOADED +
". Current Status: " + submissionStatus,
HttpStatus.BAD_REQUEST);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ public void testSubmissionAlreadyUploaded() throws Exception {
.content(metadataJson)
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isBadRequest())
.andExpect(content().string("Submission " + submissionId + "is not in status OPEN. " +
.andExpect(content().string("Submission " + submissionId + " is not in status OPEN. " +
"It cannot be marked as UPLOADED. Current Status: UPLOADED"));
}

Expand Down

0 comments on commit 6a8fd5d

Please sign in to comment.