We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4fa5a35 commit 4500f58Copy full SHA for 4500f58
app/controllers/concerns/api/contests_ranking_json.rb
@@ -60,7 +60,7 @@ def calculate_ranking_score(table)
60
problem_id = submission.problem.id
61
data_set_id = submission.data_set.id
62
user_data = table[user_id]
63
- if table[user_id] && table[user_id][:problems] && table[user_id][:problems][problem_id][:data_sets]
+ if table[user_id] && table[user_id][:problems] && table[user_id][:problems][problem_id] && table[user_id][:problems][problem_id][:data_sets]
64
data = table[user_id][:problems][problem_id][:data_sets][data_set_id]
65
update_ranking_score(submission, user_data, data) unless data[:correct]
66
end
0 commit comments