Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Iliya Manolov
erp5
Commits
fae36b4d
Commit
fae36b4d
authored
7 years ago
by
Iliya Manolov
Browse files
Options
Download
Email Patches
Plain Diff
Added a check that can exclude objects from being reindexed.
parent
9d47a8ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
product/ERP5Type/Base.py
product/ERP5Type/Base.py
+12
-2
No files found.
product/ERP5Type/Base.py
View file @
fae36b4d
...
...
@@ -2839,10 +2839,20 @@ class Base( CopyContainer,
security
.
declarePublic
(
'reindexObject'
)
def
reindexObject
(
self
,
*
args
,
**
kw
):
"""
Reindexes an object
Reindexes an object. If you want to exclude your ERP5 object from
reindexing, add it to the 'explicitly_deny_object_reindexation_list'
element in your transaction variables.
args / kw required since we must follow API
"""
self
.
_reindexObject
(
*
args
,
**
kw
)
transactional_variable
=
getTransactionalVariable
()
try
:
no_reindex
=
transactional_variable
[
'explicitly_deny_object_reindexation_list'
]
except
KeyError
:
no_reindex
=
[]
if
not
self
in
no_reindex
:
self
.
_reindexObject
(
*
args
,
**
kw
)
def
_reindexObject
(
self
,
activate_kw
=
None
,
**
kw
):
# When the activity supports group methods, portal_catalog/catalogObjectList is called instead of
...
...
This diff is collapsed.
Click to expand it.
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