Correct election name mixup. Use the highcouncil build string.

This commit is contained in:
2023-12-17 13:52:57 -05:00
parent 55259a2653
commit 09ad45c897
3 changed files with 9 additions and 10 deletions
+4 -8
View File
@@ -154,30 +154,26 @@ def build_highcouncil_votes_str(config: DakinyConfig) -> str:
with Session(engine) as session:
stmt = select(CouncilMembers).where(
CouncilMembers.ElectionCycle == get_cl_election_name(config)
CouncilMembers.ElectionCycle == get_election_cycle_name(config)
)
for nominee in session.scalars(stmt):
cl_votes[nominee.MemberId] = 0
stmt = select(Votes).where(
Votes.ElectionCycle == get_election_cycle_name(config)
)
stmt = select(Votes).where(Votes.ElectionCycle == get_cl_election_name(config))
for vote in session.scalars(stmt):
if vote.VotedForId is not None:
cl_votes[vote.VotedForId] += 1
stmt = select(CouncilMembers).where(
CouncilMembers.ElectionCycle == get_dm_election_name(config)
CouncilMembers.ElectionCycle == get_election_cycle_name(config)
)
for nominee in session.scalars(stmt):
dm_votes[nominee.MemberId] = 0
stmt = select(Votes).where(
Votes.ElectionCycle == get_election_cycle_name(config)
)
stmt = select(Votes).where(Votes.ElectionCycle == get_dm_election_name(config))
for vote in session.scalars(stmt):
if vote.VotedForId is not None: