If system_init_done is not finished, allow inserts with id for any objects.
This commit is contained in:
parent
8f3fc50ce6
commit
eaf537017e
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue