Refined Person.plain_name() to avoid leading or trailing spaces when only one name component is present.

- Legacy-Id: 15456
This commit is contained in:
Henrik Levkowetz 2018-09-16 13:44:27 +00:00
parent 97db5f71b5
commit 74359e9538

View file

@ -71,7 +71,7 @@ def initials(name):
def plain_name(name):
prefix, first, middle, last, suffix = name_parts(name)
return u" ".join([first, last])
return u" ".join( n for n in (first, last) if n)
def capfirst(s):
# Capitalize the first word character, skipping non-word characters and