Export données législatives 2024
This commit is contained in:
@ -297,7 +297,8 @@ def importer_resultats_commune(engine: Engine, verbose: bool = False) -> None:
|
||||
.scalar_one_or_none()
|
||||
if not voix_nuance_commune:
|
||||
voix_nuance_commune = VoixCommuneLegislatives2022(resultats_commune_id=resultats_commune.id,
|
||||
nuance_id=nuance_code)
|
||||
nuance_id=nuance_code,
|
||||
voix_t1=0, voix_t2=0)
|
||||
session.add(voix_nuance_commune)
|
||||
|
||||
if tour == 1:
|
||||
@ -305,7 +306,7 @@ def importer_resultats_commune(engine: Engine, verbose: bool = False) -> None:
|
||||
elif tour == 2:
|
||||
voix_nuance_commune.voix_t2 += voix
|
||||
|
||||
session.commit()
|
||||
session.commit()
|
||||
|
||||
|
||||
def importer_resultats_circo(engine: Engine, verbose: bool = False) -> None:
|
||||
|
Reference in New Issue
Block a user