Commit 635e8ec4 authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: no need to search a Software Product if there is no url_string

parent 33bcd6ec
......@@ -4,15 +4,17 @@ software_product = None
software_release = None
software_type = None
use_category_uid = portal.restrictedTraverse("portal_categories/use/trade/sale").getUid(),
product_list = portal.portal_catalog(
if url_string:
use_category_uid = portal.restrictedTraverse("portal_categories/use/trade/sale").getUid(),
product_list = portal.portal_catalog(
portal_type="Software Product",
validation_state=['validated', 'published'],
use__uid=use_category_uid,
follow_up__uid=context.getFollowUpUid()
)
)
if len(product_list) != 0:
if len(product_list) != 0:
software_release = portal.portal_catalog.getResultValue(
portal_type="Software Product Release Variation",
url_string=url_string,
......
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