From fee62905a308e2b15531fb183da9e9831828fb7b Mon Sep 17 00:00:00 2001 From: David Smadja <david.smadja@assemblee-nationale.fr> Date: Tue, 25 Mar 2025 17:23:22 +0100 Subject: [PATCH] Fix #361 --- src/lib/situations.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lib/situations.ts b/src/lib/situations.ts index de6fb3218..9beaef735 100644 --- a/src/lib/situations.ts +++ b/src/lib/situations.ts @@ -303,9 +303,13 @@ export function setSituationVariableValue( ) { return false } - valueByPeriod[year - 2] = value - valueByPeriod[year - 1] = value - valueByPeriod[year] = value + if ((variable.name = "date_naissance")) { + valueByPeriod[year] = value + } else { + valueByPeriod[year - 2] = value + valueByPeriod[year - 1] = value + valueByPeriod[year] = value + } return true } -- GitLab