Commit e101a0e8 authored by Rafael Monnerat's avatar Rafael Monnerat

Fix "Speed up Optimization"

use by using "self" on transactional_cached decorator breaks ERP5Site creation due aq_base.
parent a4ed1a23
...@@ -877,12 +877,15 @@ class TemplateTool (BaseTool): ...@@ -877,12 +877,15 @@ class TemplateTool (BaseTool):
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getDependencyList') 'getDependencyList')
@transactional_cached(lambda self, bt: (self, bt))
def getDependencyList(self, bt): def getDependencyList(self, bt):
""" """
Return the list of missing dependencies for a business Return the list of missing dependencies for a business
template, given a tuple : (repository, id) template, given a tuple : (repository, id)
""" """
# use by using "self" on transactional_cached decorator
# breaks ERP5Site creation due aq_base.
@transactional_cached(lambda bt: (bt))
def _getDependency(bt):
# We do not take into consideration the dependencies # We do not take into consideration the dependencies
# for meta business templates # for meta business templates
if bt[0] == 'meta': if bt[0] == 'meta':
...@@ -929,6 +932,8 @@ class TemplateTool (BaseTool): ...@@ -929,6 +932,8 @@ class TemplateTool (BaseTool):
return result_list return result_list
raise BusinessTemplateUnknownError, 'The Business Template %s could not be found on repository %s'%(bt[1], bt[0]) raise BusinessTemplateUnknownError, 'The Business Template %s could not be found on repository %s'%(bt[1], bt[0])
return _getDependency(bt)
def findProviderInBTList(self, provider_list, bt_list): def findProviderInBTList(self, provider_list, bt_list):
""" """
Find one provider in provider_list which is present in Find one provider in provider_list which is present in
......
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