3519: Wrong 'Group as' value (Given instead of Surname) is used for custom display name

svn: r15895
This commit is contained in:
Benny Malengier 2010-09-13 19:55:13 +00:00
parent 46c9eb079c
commit 33de80e6fd

View File

@ -602,8 +602,10 @@ def fn(%s):
return db.get_name_group_mapping(pn.surname)
elif sv == Name.PTFN:
return db.get_name_group_mapping(pn.patronymic)
else:
elif sv == Name.FN:
return db.get_name_group_mapping(pn.first_name)
else:
return db.get_name_group_mapping(pn.surname)
def name_grouping_data(self, db, pn):
if pn[_GROUP]:
@ -613,7 +615,9 @@ def fn(%s):
return db.get_name_group_mapping(pn[_SURNAME])
elif sv == Name.PTFN:
return db.get_name_group_mapping(pn[_PATRONYM])
else:
elif sv == Name.FN:
return db.get_name_group_mapping(pn[_FIRSTNAME])
else:
return db.get_name_group_mapping(pn[_SURNAME])
displayer = NameDisplay()