diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamConfigurationMapDAOImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamConfigurationMapDAOImpl.java index c4e60691..f965f8a9 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamConfigurationMapDAOImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ExamConfigurationMapDAOImpl.java @@ -376,7 +376,7 @@ public class ExamConfigurationMapDAOImpl implements ExamConfigurationMapDAO { @Override @Transactional(readOnly = true) public Result checkForDeletion(final Long configurationNodeId) { - return Result.tryCatch(() -> this.examConfigurationMapRecordMapper.selectByExample() + return Result.tryCatch(() -> !this.examConfigurationMapRecordMapper.selectByExample() .where( ExamConfigurationMapRecordDynamicSqlSupport.configurationNodeId, isEqualTo(configurationNodeId)) @@ -385,7 +385,7 @@ public class ExamConfigurationMapDAOImpl implements ExamConfigurationMapDAO { .stream() .filter(rec -> !isExamFinished(rec.getExamId())) .findFirst() - .isEmpty()); + .isPresent()); } private boolean isExamFinished(final Long examId) {