From 4258bf88b2004dab3b72ab50c30fc48d3c3a4da5 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sun, 20 Sep 2015 02:54:34 +0200 Subject: [PATCH] Fixed initial setup. --- db/migrate/20150973000001_update_overview3.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/db/migrate/20150973000001_update_overview3.rb b/db/migrate/20150973000001_update_overview3.rb index c35efdb5a..8d87a0d17 100644 --- a/db/migrate/20150973000001_update_overview3.rb +++ b/db/migrate/20150973000001_update_overview3.rb @@ -1,5 +1,9 @@ class UpdateOverview3 < ActiveRecord::Migration def up + + # return if it's a new setup + return if !Setting.find_by(name: 'system_init_done') + UserInfo.current_user_id = 1 overview_role = Role.where( name: 'Agent' ).first Overview.create_or_update(