Skip to content

Commit

Permalink
Fiks reguleringstype MANUELL
Browse files Browse the repository at this point in the history
  • Loading branch information
hestad committed Jul 25, 2023
1 parent 82ba77e commit dd90b43
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit dd90b43

Please sign in to comment.