Commit abad7774 authored by Romain Courteaud's avatar Romain Courteaud

erp5_officejs_appstore_base: do not crash if data is not json

parent 8a1d7839
...@@ -16,7 +16,10 @@ for software_product in software_product_list: ...@@ -16,7 +16,10 @@ for software_product in software_product_list:
if manifest_url is not None: if manifest_url is not None:
manifest = portal.portal_catalog.getResultValue(reference=version + '/' + manifest_url) manifest = portal.portal_catalog.getResultValue(reference=version + '/' + manifest_url)
if manifest is not None: if manifest is not None:
data = json.loads(manifest.getData()) try:
data = json.loads(manifest.getData())
except ValueError:
continue
src_icon = data['icons'][0]['src'] src_icon = data['icons'][0]['src']
logo = portal.portal_catalog.getResultValue(reference='%' + src_icon, version=version, portal_type='File') logo = portal.portal_catalog.getResultValue(reference='%' + src_icon, version=version, portal_type='File')
if logo is not None: if logo is not None:
......
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