Skip to content

Commit

Permalink
Fix innlesing av vedtaksbrevdato fra tilbakekrevingsbrev
Browse files Browse the repository at this point in the history
  • Loading branch information
hestad committed Feb 10, 2025
1 parent 131d599 commit e9a2465
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import no.nav.su.se.bakover.hendelse.infrastructure.persistence.HendelsePostgres
import no.nav.su.se.bakover.hendelse.infrastructure.persistence.PersistertHendelse
import no.nav.su.se.bakover.hendelse.infrastructure.persistence.toDbJson
import java.time.LocalDate
import java.time.format.DateTimeFormatter
import java.util.UUID

class DokumentHendelsePostgresRepo(
Expand Down Expand Up @@ -216,6 +217,8 @@ class DokumentHendelsePostgresRepo(
}
}

private val vedaksbrevdatoFormatter = DateTimeFormatter.ofPattern("dd.MM.yyyy")

/**
* @param sakId Vi tar inn sakId også siden den er indeksert.
*/
Expand All @@ -237,7 +240,8 @@ class DokumentHendelsePostgresRepo(
mapOf("sakId" to sakId, "vedtakId" to vedtakId.toString()),
it,
) {
it.localDate("vedtaksbrevdato")
val uformatertDato = it.string("vedtaksbrevdato")
LocalDate.parse(uformatertDato, vedaksbrevdatoFormatter)
}
}
}
Expand Down

0 comments on commit e9a2465

Please sign in to comment.