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
5d22dc3e
Commit
5d22dc3e
authored
Mar 31, 2005
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Purge Five of get_transaction() calls.
parent
f54a143b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
doc/ZODB.txt
doc/ZODB.txt
+2
-1
lib/python/Products/Five/browser.py
lib/python/Products/Five/browser.py
+4
-1
lib/python/Products/Five/tests/test_event.py
lib/python/Products/Five/tests/test_event.py
+5
-3
No files found.
doc/ZODB.txt
View file @
5d22dc3e
...
...
@@ -58,7 +58,8 @@ The Zope Object Database, ZODB, version 3.0
Don't forget to::
get_transaction().commit()
import transaction
transaction.commit()
If you want any changes to made to be saved.
...
...
lib/python/Products/Five/browser.py
View file @
5d22dc3e
...
...
@@ -19,6 +19,9 @@ $Id: browser.py 9730 2005-03-10 22:50:43Z jw $
import
sys
from
datetime
import
datetime
# ZODB
import
transaction
# Zope 2
import
Acquisition
from
Acquisition
import
aq_inner
,
aq_parent
,
aq_base
...
...
@@ -212,7 +215,7 @@ class EditView(BrowserView):
except
WidgetsError
,
errors
:
self
.
errors
=
errors
status
=
"An error occured."
get_transaction
()
.
abort
()
transaction
.
abort
()
else
:
setUpEditWidgets
(
self
,
self
.
schema
,
source
=
self
.
adapted
,
ignoreStickyValues
=
True
,
...
...
lib/python/Products/Five/tests/test_event.py
View file @
5d22dc3e
...
...
@@ -17,6 +17,8 @@ import os, sys
if
__name__
==
'__main__'
:
execfile
(
os
.
path
.
join
(
sys
.
path
[
0
],
'framework.py'
))
import
transaction
from
Products.Five.tests.fivetest
import
*
from
Products.Five.tests.products.FiveTest.subscriber
import
clear
...
...
@@ -60,7 +62,7 @@ class EventTest(FiveTestCase):
manage_addSimpleContent
(
self
.
folder
,
'foo'
,
'Foo'
)
# somehow we need to at least commit a subtransaction to make
# renaming succeed
get_transaction
()
.
commit
(
1
)
transaction
.
commit
(
1
)
self
.
folder
.
manage_renameObject
(
'foo'
,
'bar'
)
bar
=
self
.
folder
.
bar
events
=
objectEventCatcher
.
getEvents
()
...
...
@@ -94,7 +96,7 @@ class EventTest(FiveTestCase):
manage_addSimpleContent
(
folder1
,
'foo'
,
'Foo'
)
foo
=
folder1
.
foo
# need to trigger subtransaction before copy/paste can work
get_transaction
()
.
commit
(
1
)
transaction
.
commit
(
1
)
cb
=
folder1
.
manage_cutObjects
([
'foo'
])
folder2
.
manage_pasteObjects
(
cb
)
newfoo
=
folder2
.
foo
...
...
@@ -124,7 +126,7 @@ class EventTest(FiveTestCase):
manage_addNoVerifyPasteFolder
(
self
.
folder
,
'folder1'
)
folder1
=
self
.
folder
.
folder1
# need to trigger subtransaction before copy/paste can work
get_transaction
()
.
commit
(
1
)
transaction
.
commit
(
1
)
cb
=
self
.
folder
.
manage_copyObjects
([
'foo'
])
folder1
.
manage_pasteObjects
(
cb
)
foo_copy
=
folder1
.
foo
...
...
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