fix tournament featured game

pull/1524/head
Thibault Duplessis 2016-01-26 12:00:57 +07:00
parent 4137bab139
commit 59827b33ee
1 changed files with 1 additions and 1 deletions

View File

@ -88,7 +88,7 @@ private[tournament] final class TournamentApi(
RankedPairing(ranking) map (_.flatten) flatMap { curOption =>
val candidates = pairings flatMap RankedPairing(ranking)
if (curOption.exists(_.pairing.playing)) funit
else candidates.sortBy(-_.bestRank).headOption ?? { best =>
else candidates.sortBy(_.bestRank).headOption ?? { best =>
TournamentRepo.setFeaturedGameId(tour.id, best.pairing.gameId)
}
}