Commit 36c5b833 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 65dde4a1
......@@ -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