Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
erp5
Commits
d806bdae
Commit
d806bdae
authored
Jun 20, 2013
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up TemplateTool.getDependencyList()
parent
5f4859aa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
11 deletions
+6
-11
product/ERP5/Tool/TemplateTool.py
product/ERP5/Tool/TemplateTool.py
+6
-11
No files found.
product/ERP5/Tool/TemplateTool.py
View file @
d806bdae
...
...
@@ -878,19 +878,15 @@ class TemplateTool (BaseTool):
security.declareProtected(Permissions.AccessContentsInformation,
'getDependencyList')
@transactional_cached(lambda self, bt: bt)
def getDependencyList(self, bt):
"""
Return
the
list
of
missing
dependencies
for
a
business
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
# for meta business templates
if bt[0] == 'meta':
return []
if bt[0] != 'meta':
result_list = []
for repository, property_dict_list in self.repository_dict.items():
if repository == bt[0]:
...
...
@@ -920,7 +916,7 @@ class TemplateTool (BaseTool):
except BusinessTemplateIsMeta:
provider_list = self.getProviderList(dependency)
for provider in provider_list:
if self.
portal_templates.
getInstalledBusinessTemplate(provider) is not None:
if self.getInstalledBusinessTemplate(provider) is not None:
bt_dep = self.getLastestBTOnRepos(provider)
break
if bt_dep is None:
...
...
@@ -932,8 +928,7 @@ class TemplateTool (BaseTool):
result_list.append(bt_dep)
return result_list
raise BusinessTemplateUnknownError, 'The Business Template %s could not be found on repository %s'%(bt[1], bt[0])
return _getDependency(bt)
return []
def findProviderInBTList(self, provider_list, bt_list):
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment