Skip to content

added check to make sure that votes are not empty#95

Merged
tallen42 merged 4 commits intoComputerScienceHouse:devfrom
Luminic:fix-empty-vote
Mar 14, 2026
Merged

added check to make sure that votes are not empty#95
tallen42 merged 4 commits intoComputerScienceHouse:devfrom
Luminic:fix-empty-vote

Conversation

@Luminic
Copy link

@Luminic Luminic commented Mar 11, 2026

What

This PR contains a commit that adds an if block to prevent empty vote submissions.

Why

Fixes #90
A prevention method against losing your vote.

Test Plan

I tested it with my if statement commented out and with it included, and it works!
I checked a few edge cases with write-ins as well

Env Vars

No changes

Checklist

  • Tested all changes locally

Copy link
Contributor

@tallen42 tallen42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nitpick, sorry, but could you move the check to the top of the function so that way it will return before trying all of the other vote-casting logic?

@Luminic
Copy link
Author

Luminic commented Mar 13, 2026

Moved it! I also noticed a lot of duplicate code and a duplicate check, let me know if there's anything else I should change

@Luminic Luminic requested a review from tallen42 March 13, 2026 22:01
Copy link
Contributor

@tallen42 tallen42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great!

@tallen42 tallen42 merged commit 8705fe9 into ComputerScienceHouse:dev Mar 14, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants