Browse files

tiebreak by descending score

  • Loading branch information...
1 parent 2f9bbde commit 0e52c0c9176d36ff7770ac00da9e05f65a09dce5 @gerad gerad committed Nov 14, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 models/person.coffee
View
1 models/person.coffee
@@ -199,6 +199,7 @@ PersonSchema.method 'nextTeam', (next) ->
sort = []
# sort by minimum vote count for your type
sort.push ['voteCounts.' + @role, 1] if @judge or @contestant
+ sort.push ['scores.overall', -1]
sort.push ['updatedAt', -1]
Team = mongoose.model 'Team'

0 comments on commit 0e52c0c

Please sign in to comment.