Commit 282f9433 authored by Jérome Perrin's avatar Jérome Perrin Committed by Tristan Cavelier

credential: make CredentialRequest.getTitle consistent with base

parent e7072c2d
...@@ -75,6 +75,14 @@ class CredentialRequest(Ticket, EncryptedPasswordMixin): ...@@ -75,6 +75,14 @@ class CredentialRequest(Ticket, EncryptedPasswordMixin):
name_list.append(self.getFirstName()) name_list.append(self.getFirstName())
if self.getLastName() not in (None, ''): if self.getLastName() not in (None, ''):
name_list.append(self.getLastName()) name_list.append(self.getLastName())
return ' '.join(name_list) if name_list:
return ' '.join(name_list)
return self.getReference() or self.getId()
else: else:
return self.title return self.title
security.declareProtected(Permissions.AccessContentsInformation,
'hasTitle')
def hasTitle(self):
return self.title or self.hasFirstName() or self.hasLastName()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment