Save match_scores explicitly after changing them

This commit is contained in:
Daniel Schädler 2019-05-13 11:06:52 +02:00
parent 15c4c9bba3
commit fc6a7f2184
1 changed files with 1 additions and 0 deletions

View File

@ -95,6 +95,7 @@ class PlayoffStageService
# If a match is not decided yet, it will return nil as winner.
# This is not allowed in Database. The following code filters out MatchScores that contain nil as team.
match_scores = match_scores.select { |ms| ms.team.present? }
match_scores.each(&:save)
match_below.match_scores = match_scores
match_below.save
match_below