From e196631b46def185075a3ae5fde153e71f066a15 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Wed, 31 Jul 2013 11:58:59 +0200
Subject: [PATCH] erp5_discussion: Do not display a link to the author image
 when image is empty

---
 .../erp5_discussion/DiscussionPost_getAuthorDict.xml            | 2 +-
 bt5/erp5_discussion/bt/revision                                 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/DiscussionPost_getAuthorDict.xml b/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/DiscussionPost_getAuthorDict.xml
index 49078de207..986fd2f281 100644
--- a/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/DiscussionPost_getAuthorDict.xml
+++ b/bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/DiscussionPost_getAuthorDict.xml
@@ -66,7 +66,7 @@ if author is not None:\n
   result[\'author_signature\'] = portal.ERP5Site_getUserPreferredForumSettingsDict(author.getReference())[\'preferred_forum_signature\']\n
   result[\'author_title\'] = author.getTitle()\n
   thumbnail = author.getDefaultImage()\n
-  if thumbnail is not None:\n
+  if thumbnail is not None and thumbnail.hasData():\n
     result[\'author_thumbnail_url\'] = thumbnail.absolute_url()\n
 \n
 return result\n
diff --git a/bt5/erp5_discussion/bt/revision b/bt5/erp5_discussion/bt/revision
index 0973804c41..eafdfb06c5 100644
--- a/bt5/erp5_discussion/bt/revision
+++ b/bt5/erp5_discussion/bt/revision
@@ -1 +1 @@
-137
\ No newline at end of file
+138
\ No newline at end of file
-- 
2.30.9