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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
preetwinder
erp5
Commits
ffff687e
Commit
ffff687e
authored
Jan 05, 2015
by
wenjie.zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lazy_class.py: avoid site creation crash.
parent
ee4f6e30
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
product/ERP5Type/dynamic/lazy_class.py
product/ERP5Type/dynamic/lazy_class.py
+6
-12
No files found.
product/ERP5Type/dynamic/lazy_class.py
View file @
ffff687e
...
...
@@ -289,18 +289,12 @@ class PortalTypeMetaClass(GhostBaseMetaClass, PropertyHolder):
portal_types
=
site
.
getDefaultModule
(
portal_type
=
"portal_types"
)
object_ptype
=
portal_types
.
_getOb
(
cls
.
__name__
,
None
)
if
object_ptype
is
not
None
:
workflow_list
=
getattr
(
object_ptype
,
'erp5workflow_list'
,
None
)
try
:
if
workflow_list
is
not
None
:
portal_ERP5Workflow
=
site
.
getDefaultModule
(
portal_type
=
"Workflow"
)
if
portal_ERP5Workflow
is
None
:
LOG
(
"ERP5Type.Dynamic"
,
WARNING
,
"no ERP5Workflow methods for %s"
%
cls
.
__name__
)
else
:
intializePortalTypeERP5WorkflowMethod
(
cls
,
portal_ERP5Workflow
)
except
:
pass
workflow_list
=
getattr
(
object_ptype
,
'erp5workflow_list'
,
[])
if
workflow_list
is
not
[]:
ERP5Workflow
=
getattr
(
site
,
"workflow_module"
,
None
)
if
ERP5Workflow
is
not
None
:
intializePortalTypeERP5WorkflowMethod
(
cls
,
ERP5Workflow
)
# portal type group methods, isNodeType, isResourceType...
from
Products.ERP5Type.ERP5Type
import
ERP5TypeInformation
# XXX possible optimization:
...
...
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