diff --git a/src/main/java/de/tum/in/www1/artemis/web/rest/ProgrammingExerciseResource.java b/src/main/java/de/tum/in/www1/artemis/web/rest/ProgrammingExerciseResource.java index fd265be5796f..99d4d4ed88f7 100644 --- a/src/main/java/de/tum/in/www1/artemis/web/rest/ProgrammingExerciseResource.java +++ b/src/main/java/de/tum/in/www1/artemis/web/rest/ProgrammingExerciseResource.java @@ -266,6 +266,9 @@ public ResponseEntity updateProgrammingExercise(@RequestBod // Forbid conversion between normal course exercise and exam exercise exerciseService.checkForConversionBetweenExamAndCourseExercise(updatedProgrammingExercise, programmingExerciseBeforeUpdate, ENTITY_NAME); + // Ignore changes to the default branch + updatedProgrammingExercise.setBranch(programmingExerciseBeforeUpdate.getBranch()); + if (updatedProgrammingExercise.getAuxiliaryRepositories() == null) { // make sure the default value is set properly updatedProgrammingExercise.setAuxiliaryRepositories(new ArrayList<>());