Only remote id on import mode.
This commit is contained in:
parent
73cebf8e4a
commit
4ad897ce9b
1 changed files with 5 additions and 1 deletions
|
@ -9,7 +9,11 @@ class ApplicationModel < ActiveRecord::Base
|
||||||
|
|
||||||
# for import other objects, remove 'id'
|
# for import other objects, remove 'id'
|
||||||
def self.attributes_protected_by_default
|
def self.attributes_protected_by_default
|
||||||
['type']
|
if Setting.get('import_mode')
|
||||||
|
['type']
|
||||||
|
else
|
||||||
|
['id','type']
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.param_cleanup(params)
|
def self.param_cleanup(params)
|
||||||
|
|
Loading…
Reference in a new issue