--- a/src/pyams_notify/event.py Wed Jun 07 09:34:17 2017 +0200
+++ b/src/pyams_notify/event.py Wed Jul 12 12:11:25 2017 +0200
@@ -67,10 +67,10 @@
principal_id = self.request.principal.id
principal = get_principal(self.request, principal_id)
self.source = {'id': principal.id,
- 'title': principal.title,
- 'avatar': absolute_url(IPublicProfile(principal).avatar,
- self.request,
- '++thumb++square:32x32.png')}
+ 'title': principal.title}
+ profile = IPublicProfile(principal)
+ if profile.avatar:
+ self.source['avatar'] = absolute_url(profile.avatar, self.request, '++thumb++square:32x32.png')
configuration = IBackOfficeConfiguration(self.request.root)
self.title = '{0} - {1}'.format(configuration.short_title, principal.title)