Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Romain Courteaud
erp5_rtl_support
Commits
8670f40a
Commit
8670f40a
authored
Sep 14, 2012
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
define __getitem__ instead of _getOb in class tool so that it works on Zope-2.12.23 too.
parent
d1a41392
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
product/ERP5Type/Tool/ClassTool.py
product/ERP5Type/Tool/ClassTool.py
+4
-4
No files found.
product/ERP5Type/Tool/ClassTool.py
View file @
8670f40a
...
...
@@ -224,7 +224,7 @@ if allowClassTool():
self
.
__importer
(
class_id
)
self
.
portal_types
.
resetDynamicDocumentsOnceAtTransactionBoundary
()
def
_
getOb
(
self
,
key
,
default
=
_MARKER
):
def
_
_getitem__
(
self
,
key
,
default
=
_MARKER
):
if
key
in
self
.
objectIds
():
return
FileProxy
(
self
,
key
).
__of__
(
self
)
# maybe the file has just been uploaded, and is still in the temporary
...
...
@@ -240,7 +240,7 @@ if allowClassTool():
# be read yet, because the transaction is not commited.
self
.
_v_created
=
{
name
:
True
}
self
.
write
(
name
,
body
,
create
=
True
)
return
self
.
_
getOb
(
name
)
return
self
.
_
_getitem__
(
name
)
def
_verifyObjectPaste
(
self
,
ob
,
validate_src
=
True
):
# we only allow FileProxy (this is used in PUT)
...
...
@@ -262,12 +262,12 @@ if allowClassTool():
security
=
ClassSecurityInfo
()
# we set _folder_handler to OFS_HANDLER to have default behaviour of
# using objectIds and _
getOb
# using objectIds and _
_getitem__
_folder_handler
=
OFS_HANDLER
def
objectIds
(
self
,
spec
=
None
):
return
(
'PropertySheet'
,
'Document'
,
'Constraint'
,
'Extensions'
,
'tests'
)
def
_
getOb
(
self
,
key
,
default
=
_MARKER
):
def
_
_getitem__
(
self
,
key
,
default
=
_MARKER
):
from
Products.ERP5Type.Utils
import
importLocalPropertySheet
from
Products.ERP5Type.Utils
import
importLocalDocument
from
Products.ERP5Type.Utils
import
importLocalConstraint
...
...
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