diff --git a/src/main/java/de/tum/in/www1/artemis/service/ResultService.java b/src/main/java/de/tum/in/www1/artemis/service/ResultService.java index c93ef077401b..2ff4d2b23cbf 100644 --- a/src/main/java/de/tum/in/www1/artemis/service/ResultService.java +++ b/src/main/java/de/tum/in/www1/artemis/service/ResultService.java @@ -287,7 +287,6 @@ public void createNewManualResult(Result result, boolean isProgrammingExerciseWi result.setHasFeedback(isProgrammingExerciseWithFeedback); } - // TODO: in this case we do not have a submission. However, it would be good to create one, even if it might be "empty" User user = userService.getUserWithGroupsAndAuthorities(); result.setAssessmentType(AssessmentType.MANUAL); @@ -304,7 +303,7 @@ public void createNewManualResult(Result result, boolean isProgrammingExerciseWi Result savedResult = resultRepository.save(result); // if it is an example result we do not have any participation (isExampleResult can be also null) - if (result.isExampleResult() == Boolean.FALSE) { + if (result.isExampleResult() == Boolean.FALSE || result.isExampleResult() == null) { try { result.getParticipation().addResult(savedResult); participationService.save(result.getParticipation()); diff --git a/src/main/java/de/tum/in/www1/artemis/web/rest/ResultResource.java b/src/main/java/de/tum/in/www1/artemis/web/rest/ResultResource.java index 2e09773e3354..d68488307388 100644 --- a/src/main/java/de/tum/in/www1/artemis/web/rest/ResultResource.java +++ b/src/main/java/de/tum/in/www1/artemis/web/rest/ResultResource.java @@ -151,7 +151,6 @@ else if (!result.getFeedbacks().isEmpty() && result.getFeedbacks().stream().filt * * @param planKey the plan key of the plan which is notifying about a new result * @return the ResponseEntity with status 200 (OK), or with status 400 (Bad Request) if the result has already an ID - * @throws URISyntaxException if the Location URI syntax is incorrect */ @PostMapping(value = "/results/{planKey}") @Transactional