Commit 69327762 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Titouan Soulard

erp5_api_style: check jio_api_revision table check only content of the table

parent b180aa62
...@@ -73,7 +73,9 @@ ...@@ -73,7 +73,9 @@
</item> </item>
<item> <item>
<key> <string>configuration_form_id</string> </key> <key> <string>configuration_form_id</string> </key>
<value> <string>Alarm_viewConsistencyCheckConfiguration</string> </value> <value>
<none/>
</value>
</item> </item>
<item> <item>
<key> <string>description</string> </key> <key> <string>description</string> </key>
......
if not context.Base_zCheckjIOAPIRevisionTableExists(): if not context.Base_zCheckjIOAPIRevisionTableExists():
context.Base_zCreatejIOAPIRevisionTable() context.Base_zCreatejIOAPIRevisionTable()
kw = {} from Products.ZSQLCatalog.SQLCatalog import SimpleQuery
if context.getProperty('incremental_check'): context.getPortalObject().portal_catalog.searchAndActivate(
last_active_process = context.getLastActiveProcess(include_active=True) method_id='markUnmatchingJIOAPIrevisionHash',
if last_active_process is not None: activate_kw={'tag':tag, 'priority': 8},
kw['indexation_timestamp'] = { query=SimpleQuery(comparison_operator="!=", **{"jio_api_revision.revision": None}),
'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.activate(after_tag=tag).getId() 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