Update constraints
This commit is contained in:
parent
23e042b90c
commit
d52ada1726
1 changed files with 2 additions and 2 deletions
|
@ -67,8 +67,8 @@ fun checkConstraints(
|
||||||
}
|
}
|
||||||
|
|
||||||
ConstraintType.NotOnDay -> {
|
ConstraintType.NotOnDay -> {
|
||||||
val notOnDay = constraints.map { it.day == schedule.day }
|
val notOnDay = constraints.map { it.day != schedule.day }
|
||||||
if (notOnDay.any()) {
|
if (notOnDay.none()) {
|
||||||
val dayList = constraints.mapNotNull { it.day }.distinct().sorted()
|
val dayList = constraints.mapNotNull { it.day }.distinct().sorted()
|
||||||
errors += ConstraintError("Work group requires not days $dayList, but is on ${schedule.day}!")
|
errors += ConstraintError("Work group requires not days $dayList, but is on ${schedule.day}!")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue