diff --git a/crime-evidence/src/main/java/uk/gov/justice/laa/crime/evidence/builder/UpdateEvidenceDTOBuilder.java b/crime-evidence/src/main/java/uk/gov/justice/laa/crime/evidence/builder/UpdateEvidenceDTOBuilder.java index be6b675..36f5e80 100644 --- a/crime-evidence/src/main/java/uk/gov/justice/laa/crime/evidence/builder/UpdateEvidenceDTOBuilder.java +++ b/crime-evidence/src/main/java/uk/gov/justice/laa/crime/evidence/builder/UpdateEvidenceDTOBuilder.java @@ -1,5 +1,6 @@ package uk.gov.justice.laa.crime.evidence.builder; +import java.math.BigDecimal; import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.springframework.stereotype.Component; @@ -15,10 +16,10 @@ public static UpdateEvidenceDTO build(final ApiUpdateIncomeEvidenceRequest reque .financialAssessmentId(request.getFinancialAssessmentId()) .magCourtOutcome(request.getMagCourtOutcome()) .applicantDetails(request.getApplicantEvidenceItems() != null ? request.getApplicantEvidenceItems().getApplicantDetails() : null) - .applicantPensionAmount(request.getApplicantPensionAmount()) + .applicantPensionAmount(request.getApplicantPensionAmount() != null ? request.getApplicantPensionAmount() : BigDecimal.ZERO) .applicationReceivedDate(request.getMetadata().getApplicationReceivedDate()) .partnerDetails(request.getPartnerEvidenceItems() != null ? request.getPartnerEvidenceItems().getApplicantDetails() : null) - .partnerPensionAmount(request.getPartnerPensionAmount()) + .partnerPensionAmount(request.getPartnerPensionAmount() != null ? request.getPartnerPensionAmount() : BigDecimal.ZERO) .applicantIncomeEvidenceItems(request.getApplicantEvidenceItems() != null ? request.getApplicantEvidenceItems().getIncomeEvidenceItems() : null) .partnerIncomeEvidenceItems(request.getPartnerEvidenceItems() != null ? request.getPartnerEvidenceItems().getIncomeEvidenceItems() : null) .evidencePending(request.getMetadata().getEvidencePending())