Correction import résultats bureau de vote législatives 2022
This commit is contained in:
parent
3d60013670
commit
1b0b894acc
@ -123,12 +123,12 @@ def importer_resultats_bv(engine: Engine, verbose: bool = False) -> None:
|
||||
.filter_by(bv_id=bv_id)).scalar_one()
|
||||
|
||||
if tour == 1:
|
||||
resultats_bv.inscrits_t1 = int(row[5])
|
||||
resultats_bv.votants_t1 = int(row[8])
|
||||
resultats_bv.abstentions_t1 = int(row[6])
|
||||
resultats_bv.exprimes_t1 = int(row[16])
|
||||
resultats_bv.blancs_t1 = int(row[10])
|
||||
resultats_bv.nuls_t1 = int(row[13])
|
||||
resultats_bv.inscrits_t1 = int(row[7])
|
||||
resultats_bv.votants_t1 = int(row[10])
|
||||
resultats_bv.abstentions_t1 = int(row[8])
|
||||
resultats_bv.exprimes_t1 = int(row[18])
|
||||
resultats_bv.blancs_t1 = int(row[12])
|
||||
resultats_bv.nuls_t1 = int(row[15])
|
||||
elif tour == 2:
|
||||
resultats_bv.inscrits_t2 = int(row[5])
|
||||
resultats_bv.votants_t2 = int(row[8])
|
||||
@ -137,10 +137,10 @@ def importer_resultats_bv(engine: Engine, verbose: bool = False) -> None:
|
||||
resultats_bv.blancs_t2 = int(row[10])
|
||||
resultats_bv.nuls_t2 = int(row[13])
|
||||
|
||||
row_voix = row[19:]
|
||||
row_voix = row[21:]
|
||||
|
||||
for i in range(len(row_voix) // 9):
|
||||
bloc_voix = row_voix[i * 9:(i + 1) * 9]
|
||||
for i in range(len(row_voix) // 8):
|
||||
bloc_voix = row_voix[i * 8:(i + 1) * 8]
|
||||
numero = bloc_voix[0]
|
||||
voix = int(bloc_voix[5])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user