diff --git a/classes/election_cycle.py b/classes/election_cycle.py index fe845d5..2f3aac0 100644 --- a/classes/election_cycle.py +++ b/classes/election_cycle.py @@ -22,6 +22,7 @@ from database_setup.sql_data_classes import ( ) from utils import ( TEMPLATES_DIR, + VoteType, build_highcouncil_votes_str, build_votes_str, edit_clan_council_info, @@ -294,7 +295,11 @@ class ElectionCycle: session.commit() # add the highcouncil role to everyone with 3 or more votes. set elected to true in database - stmt = select(Votes.VotedForId).where(Votes.ElectionCycle == election_name) + stmt = ( + select(Votes.VotedForId) + .where(Votes.ElectionCycle == election_name) + .where(Votes.Type == VoteType.COUNCIL.value) + ) vote_count = collections.Counter(session.scalars(stmt)) for user_id, votes in vote_count.items():