summaryrefslogtreecommitdiff
path: root/app/models/match.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/match.rb')
-rw-r--r--app/models/match.rb4
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