Commit 583ae5a0 authored by Jérome Perrin's avatar Jérome Perrin

web_renderjs_ui: use context-free getDocumentValueList for reference lookups

When looking up a document by reference, using getDocumentValueList from
the context of a web site / web section might not find the documents,
depending on the predicates defined on the web site / web section.
parent cdf0e6d9
Pipeline #26212 failed with stage
in 0 seconds
......@@ -11,7 +11,7 @@ if appcache_reference:
appcache_manifest_modification_date = appcache_manifest.getObject().getModificationDate()
if url_list:
for referenced_document in context.getDocumentValueList(reference=url_list):
for referenced_document in context.getPortalObject().portal_catalog.getDocumentValueList(reference=url_list):
if referenced_document.getModificationDate() > appcache_manifest_modification_date:
error_list.append(
"Document {} is newer than cache manifest".format(referenced_document.getReference()))
......
......@@ -18,7 +18,7 @@ web_page_by_reference = {}
if web_page_reference_list:
web_page_list = [
b.getObject() for b in
context.getDocumentValueList(reference=web_page_reference_list)]
portal.portal_catalog.getDocumentValueList(reference=web_page_reference_list)]
web_page_by_reference = {wp.getReference(): wp.getTextContent() for wp in web_page_list}
for web_page_reference in web_page_reference_list:
......
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