notification: avoid error because of user without person
This commit is contained in:
parent
5c90a19859
commit
357c660659
2 changed files with 7 additions and 3 deletions
|
@ -63,8 +63,11 @@ class NotificationsListing(ConceptView):
|
||||||
for track in self.getNotifications(unreadOnly):
|
for track in self.getNotifications(unreadOnly):
|
||||||
data = track.data
|
data = track.data
|
||||||
s = util.getObjectForUid(data.get('sender'))
|
s = util.getObjectForUid(data.get('sender'))
|
||||||
sender = dict(label=s.title,
|
if s is None:
|
||||||
url=self.nodeView.getUrlForTarget(baseObject(s)))
|
sender = dict(label=u'???', url=u'')
|
||||||
|
else:
|
||||||
|
sender = dict(label=s.title,
|
||||||
|
url=self.nodeView.getUrlForTarget(baseObject(s)))
|
||||||
obj = util.getObjectForUid(track.taskId)
|
obj = util.getObjectForUid(track.taskId)
|
||||||
ov = self.nodeView.getViewForTarget(obj)
|
ov = self.nodeView.getViewForTarget(obj)
|
||||||
url = '%s?form.action=notification_read&track=%s' % (
|
url = '%s?form.action=notification_read&track=%s' % (
|
||||||
|
|
|
@ -86,7 +86,8 @@
|
||||||
<tr tal:repeat="notif item/getNotificationsFormatted">
|
<tr tal:repeat="notif item/getNotificationsFormatted">
|
||||||
<td tal:content="notif/timeStamp" />
|
<td tal:content="notif/timeStamp" />
|
||||||
<td tal:define="sender notif/sender">
|
<td tal:define="sender notif/sender">
|
||||||
<a tal:attributes="href sender/url"
|
<a tal:omit-tag="not:sender/url"
|
||||||
|
tal:attributes="href sender/url"
|
||||||
tal:content="sender/label" /></td>
|
tal:content="sender/label" /></td>
|
||||||
<td tal:define="object notif/object">
|
<td tal:define="object notif/object">
|
||||||
<a tal:attributes="href object/url"
|
<a tal:attributes="href object/url"
|
||||||
|
|
Loading…
Add table
Reference in a new issue