Description:
fix exclude admin in report
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r428:06bd0f1beeb4 - - 1 file changed: 2 inserted, 2 deleted

@@ -125,26 +125,26
125 }
125 }
126 end
126 end
127
127
128 if sub.peak_memory and sub.peak_memory < @by_lang[lang.pretty_name][:memory][:value]
128 if sub.peak_memory and sub.peak_memory < @by_lang[lang.pretty_name][:memory][:value]
129 @by_lang[lang.pretty_name][:memory] = {
129 @by_lang[lang.pretty_name][:memory] = {
130 avail: true,
130 avail: true,
131 user_id: sub.user_id,
131 user_id: sub.user_id,
132 value: sub.peak_memory,
132 value: sub.peak_memory,
133 sub_id: sub.id
133 sub_id: sub.id
134 }
134 }
135 end
135 end
136
136
137 - if sub.user.admin? == false and
137 + if sub.submitted_at and sub.submitted_at < @by_lang[lang.pretty_name][:first][:value] and
138 - sub.submitted_at and sub.submitted_at < @by_lang[lang.pretty_name][:first][:value]
138 + !sub.user.admin?
139 @by_lang[lang.pretty_name][:first] = {
139 @by_lang[lang.pretty_name][:first] = {
140 avail: true,
140 avail: true,
141 user_id: sub.user_id,
141 user_id: sub.user_id,
142 value: sub.submitted_at,
142 value: sub.submitted_at,
143 sub_id: sub.id
143 sub_id: sub.id
144 }
144 }
145 end
145 end
146
146
147 if @by_lang[lang.pretty_name][:length][:value] > sub.effective_code_length
147 if @by_lang[lang.pretty_name][:length][:value] > sub.effective_code_length
148 @by_lang[lang.pretty_name][:length] = {
148 @by_lang[lang.pretty_name][:length] = {
149 avail: true,
149 avail: true,
150 user_id: sub.user_id,
150 user_id: sub.user_id,
You need to be logged in to leave comments. Login now