diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/checks/OrientationTableDuplicatesCheck.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/checks/OrientationTableDuplicatesCheck.java index 681fc7b9..b5935d6d 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/checks/OrientationTableDuplicatesCheck.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/checks/OrientationTableDuplicatesCheck.java @@ -66,15 +66,15 @@ public class OrientationTableDuplicatesCheck implements DBIntegrityCheck { } } - if (toDelete.isEmpty()) { - return "OK"; - } - final List checkedToDelete = toDelete .stream() .filter(this::doubleCheck) .collect(Collectors.toList()); + if (checkedToDelete == null || checkedToDelete.isEmpty()) { + return "OK"; + } + if (tryFix) { checkedToDelete