Skip to content

Commit

Permalink
Åpne for at saksnummer kan være null dersom journalpostId er utfylt.
Browse files Browse the repository at this point in the history
  • Loading branch information
frodeli committed Sep 24, 2024
1 parent e7d35e5 commit ab4d087
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion api-kontrakt/src/main/kotlin/no/nav/aap/oppgave/OppgaveDto.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,12 @@ data class OppgaveDto(
val opprettetTidspunkt: LocalDateTime,
val endretAv: String? = null,
val endretTidspunkt: LocalDateTime? = null,
)
) {
init {
if (journalpostId == null) {
if (saksnummer == null || behandlingRef == null) {
throw IllegalArgumentException("Saksnummer og behandlingRef kan ikke være null dersom journalpostId er null")
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE OPPGAVE ALTER COLUMN SAKSNUMMER DROP NOT NULL;

0 comments on commit ab4d087

Please sign in to comment.