fix small authorization

This commit is contained in:
Harry Bomrah 2015-08-21 17:23:32 +08:00
parent 3e8b1f1119
commit 5e3a521df1
1 changed files with 1 additions and 0 deletions

View File

@ -18,6 +18,7 @@ class Admin::TicketsController < OrbitAdminController
end end
else else
@categories = authorizations.collect{|authorization| authorization.category} @categories = authorizations.collect{|authorization| authorization.category}
@categories.delete(nil)
@categories.each do |category| @categories.each do |category|
temp = Ticket.where(:category_id => category.id).open.not_urgent.limit(5).asc(:created_at) temp = Ticket.where(:category_id => category.id).open.not_urgent.limit(5).asc(:created_at)
@tickets[category] = temp if temp.count > 0 @tickets[category] = temp if temp.count > 0