Skip to content

Commit

Permalink
IS-1837: Log error for kontor med potensielt feil herId
Browse files Browse the repository at this point in the history
  • Loading branch information
geir-waagboe committed Nov 23, 2023
1 parent 3da30bd commit f71c4e4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/kotlin/no/nav/syfo/behandler/BehandlerService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,11 @@ class BehandlerService(
if (shouldUpdateKontorAdresse(behandler.kontor, existingBehandlerKontor)) {
updateBehandlerKontorAddress(behandler.kontor.partnerId, behandler.kontor)
}
if (behandler.kontor.herId != null && behandler.kontor.herId.toString() != existingBehandlerKontor.herId) {
log.error("Persistert behandlerkontor har muligens feil herId ${existingBehandlerKontor.herId}: " +
"Sjekk kontor med partnerId ${existingBehandlerKontor.partnerId}." +
"Adresseregisteret returnerte overordnet herId ${behandler.kontor.herId} for behandler ${behandler.behandlerRef}")
}
}

private fun shouldUpdateKontorSystem(
Expand Down

0 comments on commit f71c4e4

Please sign in to comment.