Skip to content

Commit 4500f58

Browse files
authored
Update contests_ranking_json.rb
1 parent 4fa5a35 commit 4500f58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/concerns/api/contests_ranking_json.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def calculate_ranking_score(table)
6060
problem_id = submission.problem.id
6161
data_set_id = submission.data_set.id
6262
user_data = table[user_id]
63-
if table[user_id] && table[user_id][:problems] && table[user_id][:problems][problem_id][:data_sets]
63+
if table[user_id] && table[user_id][:problems] && table[user_id][:problems][problem_id] && table[user_id][:problems][problem_id][:data_sets]
6464
data = table[user_id][:problems][problem_id][:data_sets][data_set_id]
6565
update_ranking_score(submission, user_data, data) unless data[:correct]
6666
end

0 commit comments

Comments
 (0)