From 961433688fb2ee1f24175e3b330d514a60ff9573 Mon Sep 17 00:00:00 2001 From: Emmanuel Raviart <emmanuel@raviart.com> Date: Thu, 31 Oct 2024 15:48:52 +0100 Subject: [PATCH] Dont't call instant(None) --- leximpact_socio_fiscal_api/routers/simulations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/leximpact_socio_fiscal_api/routers/simulations.py b/leximpact_socio_fiscal_api/routers/simulations.py index c5dbed9..6330fb7 100644 --- a/leximpact_socio_fiscal_api/routers/simulations.py +++ b/leximpact_socio_fiscal_api/routers/simulations.py @@ -119,8 +119,8 @@ def apply_parametric_reform(parameters, parameter_change_by_name): changeType = change.get("type") if changeType == "parameter": parameter.update( - start=instant(change.get("start")), - stop=instant(change.get("stop")), + start=instant(change["start"]) if change.get("start") != None else None, + stop=instant(change["stop"]) if change.get("stop") != None else None, value=change.get("value"), ) elif changeType == "scale": -- GitLab