Fix bug.
This commit is contained in:
parent
23677b4798
commit
591399eaba
|
@ -47,7 +47,7 @@ class Admin::RulingTimersController < OrbitMemberController
|
|||
end
|
||||
def timer_management
|
||||
@timer_temps = RulingTimerTemp.all.page(params[:page]).per(15)
|
||||
@active_users = @timer_temps.map{|t| t.user}
|
||||
@active_users = @timer_temps.map{|t| t.user}.compact
|
||||
end
|
||||
def task_management
|
||||
@tasks = RulingTimerTask.all.desc(:created_at).page(params[:page]).per(10)
|
||||
|
|
|
@ -51,6 +51,11 @@ Rails.application.routes.draw do
|
|||
category.title_translations = I18n.available_locales.map{|l| [l.to_s,I18n.with_locale(l){I18n.t("ruling_timer.personal_project")}]}.to_h
|
||||
category.save
|
||||
end
|
||||
RulingTimerTemp.all.to_a.each do |t|
|
||||
if t.user.nil?
|
||||
t.destroy
|
||||
end
|
||||
end
|
||||
rescue => e
|
||||
puts e.to_s
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue