Bug 8809 Multiple GEDCOM imports creates duplicate event IDs
This commit is contained in:
parent
f3b57fda0a
commit
e8caa9997b
5
gramps/plugins/lib/libgedcom.py
Normal file → Executable file
5
gramps/plugins/lib/libgedcom.py
Normal file → Executable file
@ -1747,10 +1747,11 @@ class IdFinder(object):
|
|||||||
@rtype: str
|
@rtype: str
|
||||||
"""
|
"""
|
||||||
index = self.prefix % self.index
|
index = self.prefix % self.index
|
||||||
while str(index) in self.ids:
|
# self.ids contains 'bytes' data
|
||||||
|
while index.encode('utf-8') in self.ids:
|
||||||
self.index += 1
|
self.index += 1
|
||||||
index = self.prefix % self.index
|
index = self.prefix % self.index
|
||||||
self.ids.add(index)
|
self.ids.add(index.encode('utf-8'))
|
||||||
self.index += 1
|
self.index += 1
|
||||||
return index
|
return index
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user