From d52ada17262e26b0c713561135aed4782acbc31b Mon Sep 17 00:00:00 2001 From: Lars Westermann Date: Mon, 10 Jun 2019 16:14:53 +0200 Subject: [PATCH] Update constraints --- src/commonMain/kotlin/de/kif/common/ConstraintChecking.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commonMain/kotlin/de/kif/common/ConstraintChecking.kt b/src/commonMain/kotlin/de/kif/common/ConstraintChecking.kt index 7e9c7a8..78e2ee8 100644 --- a/src/commonMain/kotlin/de/kif/common/ConstraintChecking.kt +++ b/src/commonMain/kotlin/de/kif/common/ConstraintChecking.kt @@ -67,8 +67,8 @@ fun checkConstraints( } ConstraintType.NotOnDay -> { - val notOnDay = constraints.map { it.day == schedule.day } - if (notOnDay.any()) { + val notOnDay = constraints.map { it.day != schedule.day } + if (notOnDay.none()) { val dayList = constraints.mapNotNull { it.day }.distinct().sorted() errors += ConstraintError("Work group requires not days $dayList, but is on ${schedule.day}!") }