view votes can't see HC elections #49
Notifications
Due Date
No due date set.
Blocks
Depends on
#48 Revamp view votes command
imcompiling/dakiny-bot
#61 Create virtual environment and update python version.
imcompiling/dakiny-bot
Reference: imcompiling/dakiny-bot#49
Reference in New Issue
Block a user
When I am selecting election to view from, I am only looking at the election information for elections. This is incorrect now since I added the highcouncil elections. They are not added as a new election, rather just adding an affix to the current election name and adding votes to it.
Easiest solution will be to modify the statement for retrieving the election names to be all unique names within the Votes table.
Alternative solution would be to modify the Votes table to track whether it is a HC vote outside of the election name. This would solve this issue but also that the foreign key in Votes doesn't exist for HC election names. This would require a bit more work (modifying the existing election information) but would be better design.
Threw in the quick bandaid fix mentioned above in main.
The main action of this issue will be to design the Votes table better so that the HC votes are linked properly to each ElectionInformation entry.
Work will have to be done to convert the old data into the new table.
Refitting the Votes table to have a field that determines the type of vote from [Council, DiscordManager, ClanLeader]. Still need to convert old data along with editing the high council voting actions.
Also need to update the view command to be able to use the new type.
I am using an enum within python to define the type. Python 3.11 introduced String Enums, so now I would like to upgrade python versions to 3.12.
After upgrading, need to edit the database to add back the check for Type, and change the variable type.
49--view-votes-can't-see-HC-electionsto 49-view-votes-can't-see-HC-elections49-view-votes-can't-see-HC-electionsto 49-view-votes-cant-see-HC-electionsUpdated all database definitions to current. Just need to edit the data (election name and vote types) once done with the development.
It worked first try surprisingly.
Updated all data on dakiny server.