mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Fixed bug where wrestler deducted points were deducting twice from the team score
This commit is contained in:
@@ -53,9 +53,7 @@ class School < ActiveRecord::Base
|
||||
def total_points_scored_by_wrestlers
|
||||
points = 0.0
|
||||
self.wrestlers.each do |w|
|
||||
if w.extra != true
|
||||
points = points + w.total_team_points
|
||||
end
|
||||
points = points + w.total_team_points
|
||||
end
|
||||
points
|
||||
end
|
||||
@@ -65,11 +63,6 @@ class School < ActiveRecord::Base
|
||||
deductedPoints.each do |d|
|
||||
points = points + d.points
|
||||
end
|
||||
self.wrestlers.each do |w|
|
||||
w.deductedPoints.each do |d|
|
||||
points = points + d.points
|
||||
end
|
||||
end
|
||||
points
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user