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(),