1
Fork 0

Tournament table: allow tours with no game.

master
vonavi 2014-03-25 15:15:47 +02:00
parent c82e0f7d73
commit 2de1581f4d
1 changed files with 6 additions and 4 deletions

View File

@ -54,11 +54,13 @@ module LORChess
def fill_results
@@db_results.each do |tour|
# zero-based round
round = (tour['number'] - 1).div(@@dim - 1)
if tour['games']
# zero-based round
round = (tour['number'] - 1).div(@@dim - 1)
tour['games'].each do |game|
import game, round
tour['games'].each do |game|
import game, round
end
end
end
end