The get_name_group_mapping method should return a str
Fixes #10084, #10085, #10086.
This commit is contained in:
parent
7d9556c933
commit
fd329764ed
@ -917,8 +917,11 @@ class DbBsddbRead(DbReadBase, Callback):
|
||||
Return the default grouping name for a surname.
|
||||
Return type is a unicode object
|
||||
"""
|
||||
key = surname.encode('utf-8')
|
||||
return self.name_group.get(key, surname)
|
||||
group = self.name_group.get(surname.encode('utf-8'))
|
||||
if group is not None:
|
||||
return group.decode('utf-8')
|
||||
else:
|
||||
return surname
|
||||
|
||||
def get_name_group_keys(self):
|
||||
"""
|
||||
|
@ -1640,7 +1640,7 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
||||
if data is not None:
|
||||
txn.delete(sname)
|
||||
if group is not None:
|
||||
txn.put(sname, group)
|
||||
txn.put(sname, group.encode('utf-8'))
|
||||
if group is None:
|
||||
grouppar = ''
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user