Commit ed8c62b5 authored by Romain Courteaud's avatar Romain Courteaud Committed by Xiaowu Zhang

erp5_web_renderjs_ui: appcache document may not exist

parent e0dec940
appcache_reference = context.getLayoutProperty("configuration_manifest_url", default="gadget_erp5.appcache")
text_content = context.getPortalObject().portal_catalog.getResultValue(
web_manifest = context.getPortalObject().portal_catalog.getResultValue(
portal_type='Web Manifest',
reference=appcache_reference).getTextContent()
reference=appcache_reference)
if web_manifest is None:
text_content = ''
else:
text_content = web_manifest.getTextContent()
translation_data_url_list = []
url_list = []
......
......@@ -7,8 +7,10 @@ error_list = []
if appcache_reference:
url_list = context.Base_getListFileFromAppcache()
# Check that the manifest is newer than all cached resources.
appcache_manifest = getDocumentValue(appcache_reference).getObject()
appcache_manifest_modification_date = appcache_manifest.getModificationDate()
appcache_manifest = getDocumentValue(appcache_reference)
if appcache_manifest is not None:
appcache_manifest = appcache_manifest.getObject()
appcache_manifest_modification_date = appcache_manifest.getModificationDate()
for url in url_list:
if url:
referenced_document = getDocumentValue(url)
......
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