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:
parent
97db5f71b5
commit
74359e9538
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue