Commit 79aa7760 authored by Tristan Cavelier's avatar Tristan Cavelier

erp5_ci_slideshow: fix no related object raises on WebPage_viewAsWeb

parent 4a1e76ef
...@@ -60,6 +60,7 @@ def getThemeFromFirstFollowUpProduct(reference): ...@@ -60,6 +60,7 @@ def getThemeFromFirstFollowUpProduct(reference):
if category.find(product_match_string) > 1: if category.find(product_match_string) > 1:
relative_url = category.split("follow_up/")[1] relative_url = category.split("follow_up/")[1]
category_object = portal.portal_catalog(relative_url=relative_url,limit=1) category_object = portal.portal_catalog(relative_url=relative_url,limit=1)
if len(category_object) > 0:
category_title = category_object[0].getTitle() category_title = category_object[0].getTitle()
theme = category_title.split(software_match_string)[0].lower() theme = category_title.split(software_match_string)[0].lower()
......
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