provide principal.title if no person available
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3043 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
94f902dd53
commit
82b2c9b29a
1 changed files with 3 additions and 2 deletions
|
@ -173,12 +173,13 @@ class TrackDetails(object):
|
|||
|
||||
@Lazy
|
||||
def user(self):
|
||||
obj = util.getObjectForUid(self.track.userName)
|
||||
userName = self.track.userName
|
||||
obj = util.getObjectForUid(userName)
|
||||
if obj is None:
|
||||
try:
|
||||
userTitle = self.authentication.getPrincipal(userName)
|
||||
except PrincipalLookupError:
|
||||
userTitle = self.track.userName
|
||||
userTitle = userName
|
||||
return dict(object=None, title=userTitle, url='')
|
||||
node = self.view.nodeView
|
||||
url = node is not None and node.getUrlForTarget(obj) or ''
|
||||
|
|
Loading…
Add table
Reference in a new issue