From 62db4533b71691d94450d3ade8f7667ba22416fe Mon Sep 17 00:00:00 2001 From: Karl Baker Date: Fri, 25 Oct 2024 16:43:10 +0100 Subject: [PATCH] Set pension amount if not set --- .../laa/crime/evidence/builder/UpdateEvidenceDTOBuilder.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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())