Corrections quelques bureaux de vote

This commit is contained in:
2024-06-18 23:29:44 +02:00
parent 66b8fb8103
commit df85902b5b
2 changed files with 16 additions and 2 deletions

View File

@ -250,6 +250,14 @@ def importer_bureaux_vote(engine: Engine, verbose: bool = False) -> None:
numero_circo = int(bv_dict['codeCirconscription'][len(dpt_code):])
code_circo = f"{dpt_code}-{numero_circo:02d}"
bv_id = bv_dict['id_bv'].split()[0]
if code_commune == "57447":
# Petites erreurs sur la commune de Marly
code_bv = int(bv_id.split('_')[1])
elif bv_id == "59508_3":
# Petite erreur à Roncq
code_bv = 103
bv_libelle = f"Bureau {code_bv} de {bv_dict['nomCommune']}"
if not session.execute(select(Commune).filter_by(code_insee=code_commune)).scalar_one_or_none():