Description:
fix submission report, when submissions belong no non-existing user
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r415:8de9a512ac85 - - 1 file changed: 2 inserted, 0 deleted

@@ -48,12 +48,13
48 48
49 49 User.find_each do |user|
50 50 @submissions[user.id] = { login: user.login, full_name: user.full_name, count: 0, sub: { } }
51 51 end
52 52
53 53 Submission.where("submitted_at >= ? AND submitted_at <= ?",@since_time,@until_time).find_each do |s|
54 + if @submissions[s.user_id]
54 55 if not @submissions[s.user_id][:sub].has_key?(s.problem_id)
55 56 a = nil
56 57 begin
57 58 a = Problem.find(s.problem_id)
58 59 rescue
59 60 a = nil
@@ -65,6 +66,7
65 66 @submissions[s.user_id][:sub][s.problem_id][:sub_ids] << s.id
66 67 end
67 68 @submissions[s.user_id][:count] += 1
68 69 end
69 70 end
70 71 end
72 + end
You need to be logged in to leave comments. Login now