Commit 45e45842 authored by Jérome Perrin's avatar Jérome Perrin

BusinessTemplate: drop useless fixZSQLMethod in SkinTemplateItem.install

In SkinTemplateItem.install, self._objects contains entries for skin
folders and for all skins. objectValues method calls was called for skin
folders (as expected) and also for all skins, which acquire objectValues
from skin folder and do the work again.

This simplifies this by only running this for skin folders.
parent 9ca9d73d
......@@ -2037,6 +2037,11 @@ class SkinTemplateItem(ObjectTemplateItem):
# Do not register skin which were explicitely ask not to be installed
if not force and update_dict.get(relative_url) == 'nothing':
continue
# self._objects contains the skin folder and all skins, for this
# we want to process only the skin folder
relative_url = relative_url.split('/')
if len(relative_url) != 2:
continue
folder = self.unrestrictedResolveValue(p, relative_url)
for obj in folder.objectValues(spec=('Z SQL Method', 'ERP5 SQL Method')):
fixZSQLMethod(p, obj)
......
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