--- a/src/pyams_content/shared/common/skin/opengraph.py Thu Jul 05 15:12:11 2018 +0200
+++ b/src/pyams_content/shared/common/skin/opengraph.py Fri Jul 06 18:05:59 2018 +0200
@@ -78,7 +78,7 @@
if (illustration is not None) and illustration.has_data():
break
target = get_parent(target, IIllustrationTarget, allow_context=False)
- if illustration is not None:
+ if (target is not None) and (illustration is not None):
data = II18n(illustration).query_attribute('data', lang=lang, request=request)
thumbnail = IThumbnails(data).get_thumbnail('800x600')
yield PropertyMeta('og:image:url', absolute_url(thumbnail, self.request))