Commit 7d3c55e2 authored by Jérome Perrin's avatar Jérome Perrin

BusinessTemplate: fix NameError on view when erp5_forge is not updated

This only happens in rare condition:
 * products where updated and ERP5VCS is moved to portal_components
 * everything is updated except erp5_forge
 * preferences for VCS working copies is set
parent f625f865
...@@ -5816,8 +5816,11 @@ Business Template is a set of definitions, such as skins, portal types and categ ...@@ -5816,8 +5816,11 @@ Business Template is a set of definitions, such as skins, portal types and categ
# could be moved to Products.ERP5.Base.Base # could be moved to Products.ERP5.Base.Base
try: try:
from erp5.component.module.WorkingCopy import NotAWorkingCopyError from erp5.component.module.WorkingCopy import NotAWorkingCopyError
except ImportError:
return False
try:
return self.getVcsTool().reference in vcs return self.getVcsTool().reference in vcs
except (ImportError, NotAWorkingCopyError): except NotAWorkingCopyError:
return None in vcs return None in vcs
security.declareProtected(Permissions.ManagePortal, 'export') security.declareProtected(Permissions.ManagePortal, 'export')
......
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