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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yusei Tahara
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
Hide 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):
...
@@ -289,18 +289,12 @@ class PortalTypeMetaClass(GhostBaseMetaClass, PropertyHolder):
portal_types
=
site
.
getDefaultModule
(
portal_type
=
"portal_types"
)
portal_types
=
site
.
getDefaultModule
(
portal_type
=
"portal_types"
)
object_ptype
=
portal_types
.
_getOb
(
cls
.
__name__
,
None
)
object_ptype
=
portal_types
.
_getOb
(
cls
.
__name__
,
None
)
if
object_ptype
is
not
None
:
if
object_ptype
is
not
None
:
workflow_list
=
getattr
(
object_ptype
,
'erp5workflow_list'
,
None
)
workflow_list
=
getattr
(
object_ptype
,
'erp5workflow_list'
,
[])
try
:
if
workflow_list
is
not
[]:
if
workflow_list
is
not
None
:
ERP5Workflow
=
getattr
(
site
,
"workflow_module"
,
None
)
portal_ERP5Workflow
=
site
.
getDefaultModule
(
portal_type
=
"Workflow"
)
if
ERP5Workflow
is
not
None
:
if
portal_ERP5Workflow
is
None
:
intializePortalTypeERP5WorkflowMethod
(
cls
,
ERP5Workflow
)
LOG
(
"ERP5Type.Dynamic"
,
WARNING
,
"no ERP5Workflow methods for %s"
%
cls
.
__name__
)
else
:
intializePortalTypeERP5WorkflowMethod
(
cls
,
portal_ERP5Workflow
)
except
:
pass
# portal type group methods, isNodeType, isResourceType...
# portal type group methods, isNodeType, isResourceType...
from
Products.ERP5Type.ERP5Type
import
ERP5TypeInformation
from
Products.ERP5Type.ERP5Type
import
ERP5TypeInformation
# XXX possible optimization:
# 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