When ranking, put them at or above the given rank
authorSverre Rabbelier <srabbelier@gmail.com>
Sat, 11 Apr 2009 12:27:41 +0000
changeset 2150 5c125051252e
parent 2149 8e6f98adb243
child 2151 f58515b0b2e1
When ranking, put them at or above the given rank Patch by: Sverre Rabbelier
app/soc/views/models/student_proposal.py
--- a/app/soc/views/models/student_proposal.py	Sat Apr 11 12:27:20 2009 +0000
+++ b/app/soc/views/models/student_proposal.py	Sat Apr 11 12:27:41 2009 +0000
@@ -693,7 +693,8 @@
         # get the score at the requested rank
         score_at_rank = score_and_rank[0][0]
         # calculate the score that should be given to end up at the given rank
-        given_score = score_at_rank - entity.score
+        # give +1 to make sure that in the case of a tie they end up top
+        given_score = score_at_rank - entity.score + 1
     else:
       # might be None (if Host or Developer is commenting)
       reviewer = mentor