Group As override is ignored for ma/patronymic surnames

Fixes #12395

discourse:
https://gramps.discourse.group/t/patronymic-and-matronymic-name/1684/5
This commit is contained in:
SNoiraud 2021-08-07 13:36:33 +02:00 committed by Nick Hall
parent 2ada529a21
commit bfcbd38610

View File

@ -1007,8 +1007,16 @@ class NameDisplay:
"""
if pn[_GROUP]:
return pn[_GROUP]
return db.get_name_group_mapping(_raw_primary_surname_only(
name = pn[_GROUP]
if name == "":
# if we have no prinary surname, perhaps we have a
# patronymic/matronynic name ?
name = db.get_name_group_mapping(_raw_patro_surname_only(
pn[_ORIGINPATRO]))
if not name:
name = db.get_name_group_mapping(_raw_primary_surname_only(
pn[_SURNAME_LIST]))
return name
def _make_fn(self, format_str, d, args):
"""