Skip to content

Commit

Permalink
Merge pull request #1311 from navikt/fullmektig
Browse files Browse the repository at this point in the history
Avoid partsearch whitout part.
  • Loading branch information
oyvind-wedoe authored Jan 21, 2025
2 parents 111d2da + b6db4f3 commit e72fafa
Showing 1 changed file with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1339,13 +1339,31 @@ class BehandlingService(

val partView = if (behandling.prosessfullmektig == null) {
null
} else {
} else if (behandling.prosessfullmektig!!.partId != null) {
partSearchService.searchPartWithUtsendingskanal(
identifikator = behandling.prosessfullmektig?.partId?.value!!,
skipAccessControl = true,
sakenGjelderId = behandling.sakenGjelder.partId.value,
tema = behandling.ytelse.toTema(),
)
} else {
BehandlingDetaljerView.PartViewWithUtsendingskanal(
id = null,
name = behandling.prosessfullmektig!!.navn!!,
type = null,
available = true,
language = null,
statusList = listOf(),
address = BehandlingDetaljerView.Address(
adresselinje1 = behandling.prosessfullmektig!!.address!!.adresselinje1,
adresselinje2 = behandling.prosessfullmektig!!.address!!.adresselinje2,
adresselinje3 = behandling.prosessfullmektig!!.address!!.adresselinje3,
landkode = behandling.prosessfullmektig!!.address!!.landkode,
postnummer = behandling.prosessfullmektig!!.address!!.postnummer,
poststed = behandling.prosessfullmektig!!.address!!.poststed,
) ,
utsendingskanal = BehandlingDetaljerView.Utsendingskanal.SENTRAL_UTSKRIFT
)
}

publishInternalEvent(
Expand Down

0 comments on commit e72fafa

Please sign in to comment.