Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
erp5_rtl_support
Commits
feded98f
Commit
feded98f
authored
Oct 24, 2013
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BusinessTemplate: do not fail when regenerating roles of a path that no longer exist
parent
09960648
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
product/ERP5/Document/BusinessTemplate.py
product/ERP5/Document/BusinessTemplate.py
+4
-3
No files found.
product/ERP5/Document/BusinessTemplate.py
View file @
feded98f
...
@@ -1489,18 +1489,19 @@ class PathTemplateItem(ObjectTemplateItem):
...
@@ -1489,18 +1489,19 @@ class PathTemplateItem(ObjectTemplateItem):
def
install
(
self
,
context
,
*
args
,
**
kw
):
def
install
(
self
,
context
,
*
args
,
**
kw
):
super
(
PathTemplateItem
,
self
).
install
(
context
,
*
args
,
**
kw
)
super
(
PathTemplateItem
,
self
).
install
(
context
,
*
args
,
**
kw
)
# Regenerate local roles for all paths in this business template
p
=
context
.
getPortalObject
()
p
=
context
.
getPortalObject
()
portal_type_role_list_len_dict
=
{}
portal_type_role_list_len_dict
=
{}
update_dict
=
defaultdict
(
list
)
update_dict
=
defaultdict
(
list
)
for
path
in
self
.
_objects
:
for
path
in
self
.
_objects
:
obj
=
p
.
unrestrictedTraverse
(
path
)
obj
=
p
.
unrestrictedTraverse
(
path
,
None
)
try
:
try
:
portal_type
=
aq_base
(
obj
).
getPortalType
()
portal_type
=
aq_base
(
obj
).
getPortalType
()
except
Exception
,
e
:
except
Exception
,
e
:
LOG
(
"BusinessTemplate"
,
WARNING
,
LOG
(
"BusinessTemplate"
,
WARNING
,
"Could not update Local Roles as Portal Type for '%s'
is not
"
"Could not update Local Roles as Portal Type for '%s'
(obj: %s)
"
"
available (%s)"
%
(
obj
,
e
)
)
"
is not available"
%
(
path
,
obj
),
error
=
True
)
continue
continue
...
...
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