From a3de9700fb18521ceb327da6eb107b1987495489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Stette=20Haarberg?= Date: Wed, 20 Nov 2024 17:00:15 +0100 Subject: [PATCH] =?UTF-8?q?Fikser=20siste=20kj=C3=B8ring=20har=20feila=20b?= =?UTF-8?q?le=20sjekket=20feil=20hvis=20vi=20kun=20har=20feila=20(#6408)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/etterlatte-behandling/src/main/kotlin/sak/SakLesDao.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/etterlatte-behandling/src/main/kotlin/sak/SakLesDao.kt b/apps/etterlatte-behandling/src/main/kotlin/sak/SakLesDao.kt index 3ae3d6b204a..9592db1fbc2 100644 --- a/apps/etterlatte-behandling/src/main/kotlin/sak/SakLesDao.kt +++ b/apps/etterlatte-behandling/src/main/kotlin/sak/SakLesDao.kt @@ -74,7 +74,7 @@ class SakLesDao( WHERE k.sak_id=s.id AND k.kjoering='$kjoering' AND k.status = '${KjoeringStatus.FEILA.name}' - AND k.tidspunkt > (SELECT MAX(o.tidspunkt) FROM omregningskjoering o WHERE o.sak_id=k.sak_id AND o.kjoering=k.kjoering AND o.status != '${KjoeringStatus.FEILA.name}') + AND k.tidspunkt >= (SELECT MAX(o.tidspunkt) FROM omregningskjoering o WHERE o.sak_id=k.sak_id AND o.kjoering=k.kjoering) ) ) AND EXISTS(SELECT 1 FROM behandling b WHERE b.sak_id= s.id)