Fixed initial setup.

This commit is contained in:
Martin Edenhofer 2015-09-20 02:54:34 +02:00
parent 3b0a2ba87a
commit 4258bf88b2

View file

@ -1,5 +1,9 @@
class UpdateOverview3 < ActiveRecord::Migration class UpdateOverview3 < ActiveRecord::Migration
def up def up
# return if it's a new setup
return if !Setting.find_by(name: 'system_init_done')
UserInfo.current_user_id = 1 UserInfo.current_user_id = 1
overview_role = Role.where( name: 'Agent' ).first overview_role = Role.where( name: 'Agent' ).first
Overview.create_or_update( Overview.create_or_update(