Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Kirill Smelkov
Zope
Commits
7688557b
Commit
7688557b
authored
Mar 11, 2011
by
David Glick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove parent pointer while exporting
parent
a946e2e9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
src/OFS/ObjectManager.py
src/OFS/ObjectManager.py
+19
-4
No files found.
src/OFS/ObjectManager.py
View file @
7688557b
...
@@ -22,6 +22,7 @@ import marshal
...
@@ -22,6 +22,7 @@ import marshal
import
os
import
os
import
re
import
re
import
sys
import
sys
import
transaction
from
AccessControl
import
ClassSecurityInfo
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.class_init
import
InitializeClass
from
AccessControl.class_init
import
InitializeClass
...
@@ -584,10 +585,24 @@ class ObjectManager(CopyContainer,
...
@@ -584,10 +585,24 @@ class ObjectManager(CopyContainer,
cfg
=
getConfiguration
()
cfg
=
getConfiguration
()
f
=
os
.
path
.
join
(
cfg
.
clienthome
,
'%s.%s'
%
(
id
,
suffix
))
f
=
os
.
path
.
join
(
cfg
.
clienthome
,
'%s.%s'
%
(
id
,
suffix
))
ob
=
aq_base
(
ob
)
parent
=
getattr
(
ob
,
'__parent__'
,
_marker
)
if
parent
is
not
_marker
:
sp
=
transaction
.
savepoint
(
True
)
del
ob
.
__parent__
# create a savepoint so that the export includes the version
# without a __parent__ pointer
transaction
.
savepoint
(
True
)
try
:
if
toxml
:
if
toxml
:
exportXML
(
ob
.
_p_jar
,
ob
.
_p_oid
,
f
)
exportXML
(
ob
.
_p_jar
,
ob
.
_p_oid
,
f
)
else
:
else
:
ob
.
_p_jar
.
exportFile
(
ob
.
_p_oid
,
f
)
ob
.
_p_jar
.
exportFile
(
ob
.
_p_oid
,
f
)
finally
:
if
parent
is
not
_marker
:
# roll back so that we don't actually remove the __parent__
sp
.
rollback
()
if
REQUEST
is
not
None
:
if
REQUEST
is
not
None
:
return
self
.
manage_main
(
self
,
REQUEST
,
return
self
.
manage_main
(
self
,
REQUEST
,
...
...
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