Strange index and surnames count in narrative web

Fixes #010172
This commit is contained in:
SNoiraud 2017-08-23 22:06:57 +02:00
parent f4dc2a1ff5
commit 61a57b8fdf

View File

@ -290,12 +290,10 @@ def sort_people(dbase, handle_list, rlocale=glocale):
primary_name = person.get_primary_name()
if primary_name.group_as:
surname = primary_name.group_as.encode('utf-8')
surname = primary_name.group_as
else:
group_map = _nd.primary_surname(primary_name)
surname = dbase.get_name_group_mapping(group_map)
if isinstance(surname, bytes):
surname = surname.decode('utf-8')
# Treat people who have no name with those whose name is just
# 'whitespace'