diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/models/match.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/match.rb b/app/models/match.rb index cdfa0d7..e8174ce 100644 --- a/app/models/match.rb +++ b/app/models/match.rb @@ -19,9 +19,9 @@ class Match < ActiveRecord::Base # such that the match may be considered finished. def finished? ok = true - tournament_stage.scoring.stats_needed(self).each do |stat| + self.tournament_stage.scoring.stats_needed(self).each do |stat| self.users.each do |user| - ok &= statistics.where(match: self, user: user, name: stat) + ok &= self.statistics.where(user: user, name: stat).first end end ok |