Skip to content

Commit

Permalink
fix: fix hpr bug
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasDev committed Dec 20, 2024
1 parent adbc00f commit dcd2493
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,16 @@ class SykmelderService(
callId: String,
oppgaveId: Int,
): Sykmelder {
log.info("Henter sykmelder fra HPR og PDL for oppgaveid $oppgaveId")
if (hpr == null) {
try {
log.info("Henter sykmelder fra HPR og PDL for oppgaveid $oppgaveId")
if (hpr.isNullOrBlank()) {
return getDefaultSykmelder()
}
return getSykmelder(hpr, callId)
} catch (ex: Exception) {
log.error(ex.message, ex)
return getDefaultSykmelder()
}
return getSykmelder(hpr, callId)
}

private fun getDefaultSykmelder(): Sykmelder =
Expand Down

0 comments on commit dcd2493

Please sign in to comment.