From e8caa9997b79eb8444fbf7419f6aac10a721980d Mon Sep 17 00:00:00 2001 From: prculley Date: Tue, 3 May 2016 17:22:42 -0500 Subject: [PATCH] Bug 8809 Multiple GEDCOM imports creates duplicate event IDs --- gramps/plugins/lib/libgedcom.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) mode change 100644 => 100755 gramps/plugins/lib/libgedcom.py diff --git a/gramps/plugins/lib/libgedcom.py b/gramps/plugins/lib/libgedcom.py old mode 100644 new mode 100755 index 4df7b7feb..159a62809 --- a/gramps/plugins/lib/libgedcom.py +++ b/gramps/plugins/lib/libgedcom.py @@ -1747,10 +1747,11 @@ class IdFinder(object): @rtype: str """ 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 index = self.prefix % self.index - self.ids.add(index) + self.ids.add(index.encode('utf-8')) self.index += 1 return index