fixed possible double default exam template on creation

This commit is contained in:
anhefti 2022-05-03 10:37:32 +02:00
parent 35a15ab9b6
commit 6e4a1afd9e

View file

@ -185,6 +185,7 @@ public class ExamTemplateDAOImpl implements ExamTemplateDAO {
return Result.tryCatch(() -> {
checkUniqueName(data);
checkUniqueDefault(data);
final Collection<IndicatorTemplate> indicatorTemplates = data.getIndicatorTemplates();
final String indicatorsJSON = (indicatorTemplates != null && !indicatorTemplates.isEmpty())