# HG changeset patch # User Nattee Niparnan # Date 2014-09-11 18:15:48 # Node ID 06bd0f1beeb4d0e1845ed3523ab44e24db35a749 # Parent 033146f498940886db17e83262254f00d184d1d3 fix exclude admin in report diff --git a/app/controllers/report_controller.rb b/app/controllers/report_controller.rb --- a/app/controllers/report_controller.rb +++ b/app/controllers/report_controller.rb @@ -134,8 +134,8 @@ } end - if sub.user.admin? == false and - sub.submitted_at and sub.submitted_at < @by_lang[lang.pretty_name][:first][:value] + if sub.submitted_at and sub.submitted_at < @by_lang[lang.pretty_name][:first][:value] and + !sub.user.admin? @by_lang[lang.pretty_name][:first] = { avail: true, user_id: sub.user_id,