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