From dd90b43cc5bfbde95c70ac561d55a0e8e8a8f768 Mon Sep 17 00:00:00 2001 From: John Andre Hestad Date: Tue, 25 Jul 2023 12:44:06 +0200 Subject: [PATCH] Fiks reguleringstype MANUELL --- .../su/se/bakover/web/routes/regulering/ReguleringJson.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/src/main/kotlin/no/nav/su/se/bakover/web/routes/regulering/ReguleringJson.kt b/web/src/main/kotlin/no/nav/su/se/bakover/web/routes/regulering/ReguleringJson.kt index 691d10dd7d..c24d638699 100644 --- a/web/src/main/kotlin/no/nav/su/se/bakover/web/routes/regulering/ReguleringJson.kt +++ b/web/src/main/kotlin/no/nav/su/se/bakover/web/routes/regulering/ReguleringJson.kt @@ -58,7 +58,10 @@ internal fun Regulering.toJson(satsFactory: SatsFactory) = ReguleringJson( saksnummer = saksnummer, beregning = beregning?.toJson(), simulering = simulering?.toJson(), - reguleringstype = reguleringstype.toString(), + reguleringstype = when (reguleringstype) { + is Reguleringstype.AUTOMATISK -> "AUTOMATISK" + is Reguleringstype.MANUELL -> "MANUELL" + }, årsakForManuell = when (val type = reguleringstype) { Reguleringstype.AUTOMATISK -> null is Reguleringstype.MANUELL -> type.problemer.toJson()