Better handling of changes in the Daisy API by getting compiler errors with mismatched XSD.

This commit is contained in:
Andreas Svanberg 2023-03-28 10:11:14 +02:00
parent deff20cfc7
commit bf5c11e6c9

@ -94,16 +94,11 @@ public class ImporterTransactionsImpl implements ImporterTransactions {
}
private DegreeType toDegreeType(ProgramType programType) {
switch (programType) {
case BACHELOR:
return DegreeType.BACHELOR;
case MAGISTER:
return DegreeType.MAGISTER;
case MASTER:
return DegreeType.MASTER;
default:
throw new IllegalArgumentException("Unknown program type from Daisy: " + programType);
}
return switch (programType) {
case BACHELOR -> DegreeType.BACHELOR;
case MAGISTER -> DegreeType.MAGISTER;
case MASTER -> DegreeType.MASTER;
};
}
private Optional<DegreeType> getOverrideBasedOnCourse(List<CourseRegistration> courseRegistrations) {