From eaf537017ef04a0538e5e2af6ced5e8750a0c86c Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sun, 15 Feb 2015 13:54:28 +0100 Subject: [PATCH] If system_init_done is not finished, allow inserts with id for any objects. --- app/models/application_model.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/application_model.rb b/app/models/application_model.rb index 41736ea18..ec512c4a1 100644 --- a/app/models/application_model.rb +++ b/app/models/application_model.rb @@ -44,7 +44,7 @@ class ApplicationModel < ActiveRecord::Base @@import_class_list = ['Ticket', 'Ticket::Article', 'History', 'Ticket::State', 'Ticket::StateType', 'Ticket::Priority', 'Group', 'User', 'Role' ] def check_attributes_protected - if ( !Setting.get('system_init_done') || Setting.get('import_mode')) && @@import_class_list.include?( self.class.to_s ) + if !Setting.get('system_init_done') || ( Setting.get('import_mode') && @@import_class_list.include?( self.class.to_s ) ) # do noting, use id as it is else self[:id] = nil