What steps will reproduce the problem?
>>> from voting.models import Vote
>>> Vote.objects.get_scores_in_bulk([])
What is the expected output? What do you see instead?
Expected:
{}
Actual:
IndexError: list index out of range
What version of the product are you using? On what operating system?
trunk
Please provide any additional information below.
On line 43 of managers.py, the code assumes that there's an object at index
0, which isn't necessarily true. I've attached a patch which rewrites the
get_scores_in_bulk method in the model of the get_for_user_in_bulk model.
Original issue reported on code.google.com by sco...@gmail.com on 5 Nov 2007 at 9:44
Original issue reported on code.google.com by
sco...@gmail.com
on 5 Nov 2007 at 9:44Attachments: