From a42f9501e2963dcf4e1b8b41007e83a30e4dca1f Mon Sep 17 00:00:00 2001 From: mgaseta <105936322+mgaseta@users.noreply.github.com> Date: Tue, 12 Nov 2024 15:51:33 -0300 Subject: [PATCH] fix: 1667 older seedlots not updating new BV data (#1690) --- .../ca/bc/gov/backendstartapi/service/ParentTreeService.java | 4 ++-- .../SeedlotRegistrationSteps/ParentTreeStep/utils.ts | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/ca/bc/gov/backendstartapi/service/ParentTreeService.java b/backend/src/main/java/ca/bc/gov/backendstartapi/service/ParentTreeService.java index 400d110e8..18b56a292 100644 --- a/backend/src/main/java/ca/bc/gov/backendstartapi/service/ParentTreeService.java +++ b/backend/src/main/java/ca/bc/gov/backendstartapi/service/ParentTreeService.java @@ -55,8 +55,8 @@ public class ParentTreeService { //CHECKSTYLE:OFF: VariableDeclarationUsageDistance public PtCalculationResDto calculatePtVals(PtValsCalReqDto ptVals) { SparLog.info( - "Started calculation for parent tree contribution values. Number of rchard parent received:" - + " {}. Number of SMP mix parent tree received: {}.", + "Started calculation for parent tree contribution values. Number of orchard parent" + + " received: {}. Number of SMP mix parent tree received: {}.", ptVals.orchardPtVals().size(), ptVals.smpMixIdAndProps().size()); diff --git a/frontend/src/components/SeedlotRegistrationSteps/ParentTreeStep/utils.ts b/frontend/src/components/SeedlotRegistrationSteps/ParentTreeStep/utils.ts index 9b76da706..80679e1c8 100644 --- a/frontend/src/components/SeedlotRegistrationSteps/ParentTreeStep/utils.ts +++ b/frontend/src/components/SeedlotRegistrationSteps/ParentTreeStep/utils.ts @@ -751,7 +751,10 @@ export const generatePtValCalcPayload = ( coneCount: Number(row.coneCount.value), pollenCount: Number(row.pollenCount.value), smpSuccessPerc: Number(row.smpSuccessPerc.value), - nonOrchardPollenContamPct: Number(row.nonOrchardPollenContam.value), + nonOrchardPollenContamPct: + row.nonOrchardPollenContam.value + ? Number(row.nonOrchardPollenContam.value) + : 0, geneticTraits: [] }; // Populate geneticTraits array