Skip to content

Commit bb6d1ec

Browse files
committed
Check for existence of dødsfall
Updated the condition in `handle` to verify that the `Doedsfall` field is not empty before proceeding. This ensures proper handling of persons with registered deaths.
1 parent d60589f commit bb6d1ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/DoedsfallService.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ public List<DoedsfallDTO> convert(PersonDTO person) {
4545

4646
private void handle(PersonDTO person) {
4747

48-
if (!person.getSivilstand().isEmpty() &&
48+
if (!person.getDoedsfall().isEmpty() &&
49+
!person.getSivilstand().isEmpty() &&
4950
isNotBlank(person.getSivilstand().getFirst().getRelatertVedSivilstand()) &&
5051
person.getSivilstand().getFirst().isGift()) {
5152

0 commit comments

Comments
 (0)