Commit 92980bc2 authored by Romain Courteaud's avatar Romain Courteaud

Stay consistent with default getTitle.

Return empty string instead of None as default value.
parent 4fda45cc
......@@ -48,6 +48,6 @@ class Person(ERP5Person):
title = ERP5Person.getTitle(self, **kw)
test_title = title.replace(' ', '')
if test_title == '':
return self.getDefaultEmailCoordinateText()
return self.getDefaultEmailCoordinateText(test_title)
else:
return title
......@@ -14,7 +14,7 @@ class TestSlapOSPersonDocument(testSlapOSMixin):
portal_type="Person")
# Default title is empty
self.assertEquals(person.getTitle(), None)
self.assertEquals(person.getTitle(), "")
# If not title, the email is used
person.edit(default_email_coordinate_text="foo@example.org")
......
283
\ No newline at end of file
284
\ No newline at end of file
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