From 35ef5ea5db3e791886cc6ed250987c24b8942aa4 Mon Sep 17 00:00:00 2001 From: Yanick Minder Date: Thu, 21 Nov 2024 12:46:06 +0100 Subject: [PATCH] add check for get last checkin ordinal --- .../ch/puzzle/okr/mapper/keyresult/KeyResultOrdinalMapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/ch/puzzle/okr/mapper/keyresult/KeyResultOrdinalMapper.java b/backend/src/main/java/ch/puzzle/okr/mapper/keyresult/KeyResultOrdinalMapper.java index e62c93b482..772fa2a3bf 100644 --- a/backend/src/main/java/ch/puzzle/okr/mapper/keyresult/KeyResultOrdinalMapper.java +++ b/backend/src/main/java/ch/puzzle/okr/mapper/keyresult/KeyResultOrdinalMapper.java @@ -86,7 +86,7 @@ public KeyResult toKeyResultOrdinal(KeyResultOrdinalDto keyResultOrdinalDto) { public KeyResultLastCheckInOrdinalDto getLastCheckInDto(Long keyResultId) { CheckIn lastCheckIn = checkInBusinessService.getLastCheckInByKeyResultId(keyResultId); - if (lastCheckIn == null) { + if (!(lastCheckIn instanceof CheckInOrdinal)) { return null; } return new KeyResultLastCheckInOrdinalDto(lastCheckIn.getId(), lastCheckIn.getVersion(),