Skip to content
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

Merged

Conversation

thatnerdjosh
Copy link
Contributor

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.

@pypingou
Copy link
Member

Should we add unit-tests for this?

@thatnerdjosh
Copy link
Contributor Author

Ah yes, I will add them tomorrow :)
On Sep 25, 2015 10:31 PM, "Pierre-Yves Chibon" notifications@github.com
wrote:

Should we add unit-tests for this?


Reply to this email directly or view it on GitHub
#55 (comment)
.

@thatnerdjosh
Copy link
Contributor Author

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
Copy link
Member

Choose a reason for hiding this comment

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

trailing spaces ;-)

@pypingou
Copy link
Member

pypingou commented Oct 6, 2015

ping?

@thatnerdjosh
Copy link
Contributor Author

Will fix this today soon as I wake up :)
On Oct 6, 2015 12:08 AM, "Pierre-Yves Chibon" notifications@github.com
wrote:

ping?


Reply to this email directly or view it on GitHub
#55 (comment)
.

@pypingou
Copy link
Member

pypingou commented Oct 8, 2015

@NerdsvilleCEO don't forget me ;-)

@thatnerdjosh
Copy link
Contributor Author

I didn't was in the hospital my apologies heading back now
On Oct 8, 2015 12:32 AM, "Pierre-Yves Chibon" notifications@github.com
wrote:

@NerdsvilleCEO https://github.com/NerdsvilleCEO don't forget me ;-)


Reply to this email directly or view it on GitHub
#55 (comment)
.

@pypingou
Copy link
Member

pypingou commented Oct 8, 2015

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!

@pypingou
Copy link
Member

pypingou commented Oct 8, 2015

Cool, many thanks!!

pypingou added a commit that referenced this pull request Oct 8, 2015
@pypingou pypingou merged commit 20889d6 into fedora-infra:develop Oct 8, 2015
pypingou pushed a commit that referenced this pull request Nov 6, 2019
pypingou pushed a commit that referenced this pull request Nov 26, 2019
pypingou pushed a commit that referenced this pull request Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants