From 746872cbd866b311bb7ee0906a36e8527740b741 Mon Sep 17 00:00:00 2001 From: Jarkko Pesonen <435495+jrkkp@users.noreply.github.com> Date: Wed, 13 Nov 2024 15:06:29 +0200 Subject: [PATCH] VKT(Backend): Fix clerk exam event test --- .../util/exception/DataIntegrityViolationExceptionUtil.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/vkt/src/main/java/fi/oph/vkt/util/exception/DataIntegrityViolationExceptionUtil.java b/backend/vkt/src/main/java/fi/oph/vkt/util/exception/DataIntegrityViolationExceptionUtil.java index 375f4eb7b..71e10deb1 100644 --- a/backend/vkt/src/main/java/fi/oph/vkt/util/exception/DataIntegrityViolationExceptionUtil.java +++ b/backend/vkt/src/main/java/fi/oph/vkt/util/exception/DataIntegrityViolationExceptionUtil.java @@ -7,7 +7,10 @@ public class DataIntegrityViolationExceptionUtil { public static boolean isExamEventLanguageLevelDateExaminerUniquenessException( final DataIntegrityViolationException ex ) { - return matchesConstraint(ex, "uk_exam_event_language_level_date_examiner"); + return ( + matchesConstraint(ex, "uk_exam_event_language_level_date_examiner") || + matchesConstraint(ex, "uk_exam_event_language_level_date") + ); } private static boolean matchesConstraint(final DataIntegrityViolationException ex, final String constraint) {