Commit e284a969 authored by Romain Courteaud's avatar Romain Courteaud

erp5_officejs_appstore_base: handle Software Publication without lines

parent abad7774
...@@ -5,9 +5,11 @@ software_publication_list = portal.portal_catalog( ...@@ -5,9 +5,11 @@ software_publication_list = portal.portal_catalog(
**kw **kw
) )
for software_publication in software_publication_list: for software_publication in software_publication_list:
software_publication_line = software_publication.objectValues( software_publication_line_list = software_publication.objectValues(
portal_type="Software Publication Line" portal_type="Software Publication Line"
)[0] )
if software_publication_line_list:
software_publication_line = software_publication_line_list[0]
if context.getRelativeUrl() == software_publication_line.getResource(): if context.getRelativeUrl() == software_publication_line.getResource():
result.append(software_publication) result.append(software_publication)
return result return result
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