Commit fbdd8045 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

since r42523, unrestrictedTraverse(relative_url) can raise KeyError if the...

since r42523, unrestrictedTraverse(relative_url) can raise KeyError if the object is specified as 'do nothing' when installing, so we need to do 'nothing' check before calling unrestrictedTraverse(relative_url). this change fixes current failure of test_updateBusinessTemplateFromUrl_keep_list in testBusinessTemplate.py.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42638 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 74d0df27
......@@ -1561,16 +1561,15 @@ class SkinTemplateItem(ObjectTemplateItem):
p = context.getPortalObject()
skin_tool = p.portal_skins
for relative_url in self._objects.keys():
folder = p.unrestrictedTraverse(relative_url)
for obj in folder.objectValues(spec=('Z SQL Method',)):
fixZSQLMethod(p, obj)
# Do not register skin which were explicitely ask not to be installed
if context.getTemplateFormatVersion() == 1:
if update_dict.has_key(relative_url) or force:
if not force:
if update_dict[relative_url] == 'nothing':
continue
folder = p.unrestrictedTraverse(relative_url)
for obj in folder.objectValues(spec=('Z SQL Method',)):
fixZSQLMethod(p, obj)
if folder.aq_parent.meta_type == 'CMF Skins Tool':
registerSkinFolder(skin_tool, folder)
......
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