fix validation

This commit is contained in:
2022-12-09 22:05:29 +01:00
parent 27c6ab5630
commit f618d1c1a7
5 changed files with 21 additions and 11 deletions
@@ -77,7 +77,7 @@ public class TimeslotValidator implements Validator {
timeslot.setStarts(InstantHelper.truncate(timeslot.getStarts(), ChronoUnit.SECONDS));
timeslot.setEnds(InstantHelper.truncate(timeslot.getEnds(), ChronoUnit.SECONDS));
if (timeslot.getStarts().isAfter(timeslot.getStarts())) {
if (timeslot.getStarts().isAfter(timeslot.getEnds())) {
errors.rejectValue("starts", "NOT_VALID");
errors.rejectValue("ends", "NOT_VALID");
} else {