New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Candidate modification revote bug #55
Candidate modification revote bug #55
Conversation
Should we add unit-tests for this? |
Ah yes, I will add them tomorrow :)
|
ok working on this now, my apologies, been working fairly extensively on the postgres redesign, should have these tests soon |
@@ -312,13 +312,23 @@ def test_vote_range_revote(self): | |||
self.assertEqual(votes[1].value, 0) | |||
self.assertEqual(votes[2].value, 2) | |||
#Let's not do repetition of what is tested above we aren't testing the | |||
#functionality of voting as that has already been asserted | |||
#functionality of voting as that has already been asserted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trailing spaces ;-)
ping? |
Will fix this today soon as I wake up :)
|
@NerdsvilleCEO don't forget me ;-) |
I didn't was in the hospital my apologies heading back now
|
Oh, sorry to hear this! Don't worry if you can't make the edit, I can always merge manually and fix the trailing spaces while doing it, just let me know and more important, take care! |
Cool, many thanks!! |
Candidate modification revote bug
When candidates were modified between vote and revote, the index of the list went out of range, because it is technically not a revote for that specific candidate. This fix checks if the candidate is in range and if it isn't, it creates a new vote for the candidate.