From 491f24bece566ef98dd013e439defe6129b3c055 Mon Sep 17 00:00:00 2001
From: Yoshinori Okuji <yo@nexedi.com>
Date: Thu, 26 Aug 2004 13:40:08 +0000
Subject: [PATCH] Do not insert space unnecessarily.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1437 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/Person.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/product/ERP5/Document/Person.py b/product/ERP5/Document/Person.py
index 0e6809918f..a249808390 100755
--- a/product/ERP5/Document/Person.py
+++ b/product/ERP5/Document/Person.py
@@ -135,10 +135,14 @@ etc.)."""
         first name and last name
       """
       if self.title == '':
-        if not self.hasMiddleName():
-          return self.getFirstName('') + ' ' + self.getLastName('')
-        else:
-          return self.getFirstName('') + ' ' + self.getMiddleName('') + ' ' + self.getLastName('')
+        name_list = []
+	if self.getFirstName():
+          name_list.append(self.getFirstName())
+	if self.getMiddleName():
+          name_list.append(self.getMiddleName())
+	if self.getLastName():
+          name_list.append(self.getLastName())
+        return ' '.join(name_list)
       else:
         return self.title
     Title = getTitle
-- 
2.30.9