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,6 +63,9 @@ 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')) | ||||||
|  |             if s is None: | ||||||
|  |                 sender = dict(label=u'???', url=u'') | ||||||
|  |             else: | ||||||
|                 sender = dict(label=s.title,  |                 sender = dict(label=s.title,  | ||||||
|                               url=self.nodeView.getUrlForTarget(baseObject(s))) |                               url=self.nodeView.getUrlForTarget(baseObject(s))) | ||||||
|             obj = util.getObjectForUid(track.taskId) |             obj = util.getObjectForUid(track.taskId) | ||||||
|  |  | ||||||
|  | @ -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