Correction Les Hauts Talicans
This commit is contained in:
parent
5cc10f3106
commit
c4ec62d315
@ -23,6 +23,9 @@ def importer_resultats_bv(engine: Engine, verbose: bool = False) -> None:
|
||||
com_code = str(row['Code commune']).zfill(5)
|
||||
bv_code = row['Code BV']
|
||||
|
||||
if com_code == "60694":
|
||||
com_code = "60054" # Les Hauts-Talicans, données pas à jour
|
||||
|
||||
if bv := session.execute(select(BureauVote).filter_by(commune_code=com_code, code_bureau=bv_code)) \
|
||||
.scalar_one_or_none():
|
||||
bv_id = bv.id
|
||||
@ -107,6 +110,9 @@ def importer_resultats_commune(engine: Engine, verbose: bool = False) -> None:
|
||||
if dpt_code == "ZX":
|
||||
dpt_code = "977"
|
||||
|
||||
if com_code == "60694":
|
||||
com_code = "60054" # Les Hauts-Talicans, données pas à jour
|
||||
|
||||
resultats_commune = session.execute(select(ResultatsCommune).filter_by(commune_id=com_code)) \
|
||||
.scalar_one_or_none()
|
||||
if not resultats_commune:
|
||||
|
Loading…
Reference in New Issue
Block a user