Commit 47edb1cd authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Cédric Le Ninivin

erp5_api_style: check jio_api_revision table check only content of the table

parent 8546f2f4
......@@ -73,7 +73,9 @@
</item>
<item>
<key> <string>configuration_form_id</string> </key>
<value> <string>Alarm_viewConsistencyCheckConfiguration</string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>description</string> </key>
......
if not context.Base_zCheckjIOAPIRevisionTableExists():
context.Base_zCreatejIOAPIRevisionTable()
kw = {}
from Products.ZSQLCatalog.SQLCatalog import SimpleQuery
if context.getProperty('incremental_check'):
last_active_process = context.getLastActiveProcess(include_active=True)
if last_active_process is not None:
kw['indexation_timestamp'] = {
'query': last_active_process.getStartDate(),
'range': '>='
}
active_process = context.newActiveProcess().getRelativeUrl()
query_string = context.getProperty('catalog_query_string', '')
# the query sould be something like "validation_state:!=deleted validation_state:!=draft portal_type:Organisation" etc
portal = context.getPortalObject()
if query_string is not None:
kw.update(SearchableText=query_string)
parent_uid =[portal.restrictedTraverse(module).getUid()
for module in context.getProperty('module_list') or []]
if parent_uid:
kw.update(parent_uid=parent_uid)
portal.portal_catalog.searchAndActivate(
method_id='markUnmatchingJIOAPIrevisionHash',
activate_kw={'tag':tag, 'priority': 8},
**kw)
context.getPortalObject().portal_catalog.searchAndActivate(
method_id='markUnmatchingJIOAPIrevisionHash',
activate_kw={'tag':tag, 'priority': 8},
query=SimpleQuery(comparison_operator="!=", **{"jio_api_revision.revision": None}),
)
context.activate(after_tag=tag).getId()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment