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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gabriel Monnerat
erp5
Commits
48124c43
Commit
48124c43
authored
Nov 25, 2011
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix unindexation of deleted broken objects
parent
8647baae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
product/ERP5Type/dynamic/lazy_class.py
product/ERP5Type/dynamic/lazy_class.py
+15
-5
No files found.
product/ERP5Type/dynamic/lazy_class.py
View file @
48124c43
...
@@ -20,12 +20,22 @@ from portal_type_class import generatePortalTypeClass
...
@@ -20,12 +20,22 @@ from portal_type_class import generatePortalTypeClass
from
accessor_holder
import
AccessorHolderType
from
accessor_holder
import
AccessorHolderType
import
persistent_migration
import
persistent_migration
# PersistentBroken can't be reused directly
class
ERP5BaseBroken
(
Broken
,
ERP5Base
):
# because its « layout differs from 'GhostPortalType' »
# PersistentBroken can't be reused directly
ERP5BaseBroken
=
type
(
'ERP5BaseBroken'
,
(
Broken
,
ERP5Base
),
dict
(
x
# because its « layout differs from 'GhostPortalType' »
for
x
in
PersistentBroken
.
__dict__
.
iteritems
()
if
x
[
0
]
not
in
(
'__dict__'
,
'__module__'
,
'__weakref__'
)))
def
__metaclass__
(
name
,
base
,
d
):
d
=
dict
(
PersistentBroken
.
__dict__
,
**
d
)
for
x
in
'__dict__'
,
'__metaclass__'
,
'__weakref__'
:
del
d
[
x
]
return
type
(
name
,
base
,
d
)
def
__getattr__
(
self
,
name
):
try
:
return
self
.
__dict__
[
'__Broken_state__'
][
name
]
except
KeyError
:
raise
AttributeError
(
"state of broken %r object has no %r key"
%
(
self
.
__class__
.
__name__
,
name
))
# the meta class of a derived class must be a subclass of all of its bases:
# the meta class of a derived class must be a subclass of all of its bases:
# since a portal type derives from both Zope Extension classes and
# since a portal type derives from both Zope Extension classes and
...
...
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