Commit 0c2faaad authored by Roque Porchetto's avatar Roque Porchetto

erp5_wendelin_telecom_ingestion: minor fixes

parent 87409f8d
......@@ -11,7 +11,7 @@ portal_type_query = ComplexQuery(Query(portal_type='Data Stream'),
Query(portal_type='Data Array'),
Query(portal_type='Data Descriptor'),
Query(portal_type='Data Ingestion'),
operator="OR")
logical_operator="OR")
kw_dict = {"query": portal_type_query,
"reference": reference}
......
......@@ -4,9 +4,10 @@ from Products.ZSQLCatalog.SQLCatalog import Query, SimpleQuery
portal = context.getPortalObject()
portal_catalog = portal.portal_catalog
kw_dict = {"portal_type": "Data Descriptor"}
content = None
for document in portal_catalog(**kw_dict):
query = Query(portal_type="Data Descriptor")
for document in portal_catalog(query=query,
sort_on=(('id', 'DESC', 'int'),)):
if document.reference == reference:
found = True
content = document.getTextContent()
......
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