From dcf30464df8b1bfcfbd444e9ffe338cc567ad11d Mon Sep 17 00:00:00 2001 From: anhefti Date: Wed, 25 May 2022 10:24:56 +0200 Subject: [PATCH] fix check --- .../datalayer/checks/OrientationTableDuplicatesCheck.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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