Commit d341bad3 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

skip installing for 'keep object' only if the object already exists.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43409 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 120054e2
...@@ -999,10 +999,6 @@ class ObjectTemplateItem(BaseTemplateItem): ...@@ -999,10 +999,6 @@ class ObjectTemplateItem(BaseTemplateItem):
action = update_dict[path] action = update_dict[path]
if action == 'nothing': if action == 'nothing':
continue continue
elif context.isKeepObject(path):
# do nothing if the object is specified in keep list in
# force mode.
continue
# get subobjects in path # get subobjects in path
path_list = path.split('/') path_list = path.split('/')
container_path = path_list[:-1] container_path = path_list[:-1]
...@@ -1034,6 +1030,10 @@ class ObjectTemplateItem(BaseTemplateItem): ...@@ -1034,6 +1030,10 @@ class ObjectTemplateItem(BaseTemplateItem):
old_obj = container._getOb(object_id, None) old_obj = container._getOb(object_id, None)
object_existed = old_obj is not None object_existed = old_obj is not None
if object_existed: if object_existed:
if context.isKeepObject(path):
# do nothing if the object is specified in keep list in
# force mode.
continue
# Object already exists # Object already exists
recurse(saveHook, old_obj) recurse(saveHook, old_obj)
if getattr(aq_base(old_obj), 'groups', None) is not None: if getattr(aq_base(old_obj), 'groups', None) is not None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment