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
Eteri
erp5
Commits
5afcab5a
Commit
5afcab5a
authored
Jun 06, 2017
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bt5_config: Do not break any objects while loading CLass
parent
581bdde6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
product/ERP5Type/dynamic/lazy_class.py
product/ERP5Type/dynamic/lazy_class.py
+5
-2
No files found.
product/ERP5Type/dynamic/lazy_class.py
View file @
5afcab5a
...
...
@@ -11,6 +11,7 @@ from Products.ERP5Type.Base import PropertyHolder, initializePortalTypeDynamicWo
from
Products.ERP5Type.Utils
import
UpperCase
from
Products.ERP5Type.Core.CategoryProperty
import
CategoryProperty
from
ExtensionClass
import
ExtensionClass
,
pmc_init_of
from
Products.ERP5Type.Core.Folder
import
Folder
from
zope.interface
import
classImplements
from
ZODB.broken
import
Broken
,
PersistentBroken
...
...
@@ -333,7 +334,6 @@ class PortalTypeMetaClass(GhostBaseMetaClass, PropertyHolder):
# Do not load the class again if it has already been loaded
if
not
cls
.
__isghost__
:
return
# cls might be a subclass of a portal type class
# we need to find the right class to change
for
klass
in
cls
.
__mro__
:
...
...
@@ -354,7 +354,10 @@ class PortalTypeMetaClass(GhostBaseMetaClass, PropertyHolder):
LOG
(
"ERP5Type.Dynamic"
,
WARNING
,
"Could not access Portal Type Object for type %r"
%
portal_type
,
error
=
sys
.
exc_info
())
base_tuple
=
(
ERP5BaseBroken
,
)
# XXX: Add checks for testing if this is just during import and that too
# for module objects only, for other cases, the base_tuple should be
# ERP5Broken only in general
base_tuple
=
(
Folder
,)
portal_type_category_list
=
[]
attribute_dict
=
dict
(
_categories
=
[],
constraints
=
[])
interface_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