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
Noah Brackenbury
erp5
Commits
47def68c
Commit
47def68c
authored
May 07, 2014
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix cache of Predicate.asPredicate
parent
347804af
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
product/ERP5Type/Core/Predicate.py
product/ERP5Type/Core/Predicate.py
+10
-13
No files found.
product/ERP5Type/Core/Predicate.py
View file @
47def68c
...
@@ -585,16 +585,13 @@ class Predicate(XMLObject):
...
@@ -585,16 +585,13 @@ class Predicate(XMLObject):
def
asPredicate
(
self
,
script_id
=
None
):
def
asPredicate
(
self
,
script_id
=
None
):
"""
"""
This method tries to convert the current Document into a predicate
This method tries to convert the current Document into a predicate
looking up methods named Class_asPredic
ta
e, MetaType_asPredicate, PortalType_asPredicate
looking up methods named Class_asPredic
at
e, MetaType_asPredicate, PortalType_asPredicate
"""
"""
cache
=
getTransactionalVariable
()
cache
=
getTransactionalVariable
()
key
=
id
(
self
),
script_id
key
=
'asPredicate'
,
self
,
script_id
if
'asPredicate'
in
cache
:
try
:
cache
=
cache
[
'asPredicate'
]
if
key
in
cache
:
return
cache
[
key
]
return
cache
[
key
]
else
:
except
KeyError
:
cache
=
cache
[
'asPredicate'
]
=
{}
script
=
self
.
_getTypeBasedMethod
(
'asPredicate'
,
script_id
)
script
=
self
.
_getTypeBasedMethod
(
'asPredicate'
,
script_id
)
if
script
is
not
None
:
if
script
is
not
None
:
self
=
script
()
self
=
script
()
...
...
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