Skip to content

Commit

Permalink
Fikse roller for notat i underholdskostnad.
Browse files Browse the repository at this point in the history
  • Loading branch information
s148719 committed Dec 3, 2024
1 parent b823e26 commit aaf9cb9
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ class UnderholdService(
) {
val rolleSøknadsbarn =
request.underholdsid?.let {
henteOgValidereUnderholdskostnad(behandling, it).person.rolle.firstOrNull()
henteOgValidereUnderholdskostnad(
behandling,
it,
).person.rolle.filter { it.behandling.id == behandling.id }.firstOrNull()
}

if (request.underholdsid == null) {
Expand All @@ -59,12 +62,6 @@ class UnderholdService(
}
}

notatService.sletteNotat(
behandling,
Notattype.UNDERHOLDSKOSTNAD,
rolleSøknadsbarn ?: behandling.bidragsmottaker!!,
)

notatService.oppdatereNotat(
behandling,
Notattype.UNDERHOLDSKOSTNAD,
Expand Down

0 comments on commit aaf9cb9

Please sign in to comment.