diff --git a/nupes/scripts/import_resultats_web_2024.py b/nupes/scripts/import_resultats_web_2024.py index 57214bb..aeff12e 100644 --- a/nupes/scripts/import_resultats_web_2024.py +++ b/nupes/scripts/import_resultats_web_2024.py @@ -85,8 +85,10 @@ def importer_resultats_regions(engine: Engine, debug: bool = False) -> None: resultats_region.nuls = resultats["nuls"] resultats_region.exprimes = resultats["exprimes"] else: + resultats_france = session.execute(select(ResultatsFrance)).scalar_one() resultats_region = ResultatsRegion( region_id=reg_code, + resultats_france_id=resultats_france.id, inscrits=resultats["inscrits"], abstentions=resultats["abstentions"], votants=resultats["votants"],