Fix #639 and #638 (Error 500 opening a ticket view) (#640)

* Fix #639 and #638 (Error 500 opening a ticket view)

* Only initialize preferences if not already filled.
This commit is contained in:
olivergrahl 2017-01-18 09:45:20 +01:00 committed by Martin Edenhofer
parent 303db3e7c3
commit 8925c6f518

View file

@ -55,6 +55,9 @@ class Taskbar < ApplicationModel
return true if local_update
# find other same open tasks
if !preferences
preferences = {}
end
preferences[:tasks] = []
Taskbar.where(key: key).order(:created_at).each { |taskbar|
if taskbar.id == id