Update
svn: r7933
This commit is contained in:
parent
6d776c2f94
commit
a6b17dc87c
@ -1209,7 +1209,7 @@ class GrampsBSDDB(GrampsDbBase,UpdateCallback):
|
|||||||
The function must be overridden in the derived class.
|
The function must be overridden in the derived class.
|
||||||
"""
|
"""
|
||||||
name = str(person.get_primary_name().get_surname())
|
name = str(person.get_primary_name().get_surname())
|
||||||
if self.surnames.keys().count(name) > 1:
|
if self.surnames.keys().count(name) == 1:
|
||||||
self.surname_list.remove(unicode(name))
|
self.surname_list.remove(unicode(name))
|
||||||
|
|
||||||
def _get_obj_from_gramps_id(self,val,tbl,class_init,prim_tbl):
|
def _get_obj_from_gramps_id(self,val,tbl,class_init,prim_tbl):
|
||||||
|
@ -470,9 +470,10 @@ class GrampsDbBase(GrampsDBCallback):
|
|||||||
if old_data:
|
if old_data:
|
||||||
old_person = Person(old_data)
|
old_person = Person(old_data)
|
||||||
if (old_data[2] != person.gender or
|
if (old_data[2] != person.gender or
|
||||||
old_data[3][2]!= person.primary_name.first_name):
|
old_data[3][4]!= person.primary_name.first_name):
|
||||||
self.genderStats.uncount_person(old_person)
|
self.genderStats.uncount_person(old_person)
|
||||||
self.genderStats.count_person(person)
|
self.genderStats.count_person(person)
|
||||||
|
if (old_data[3][5]!=person.primary_name.surname):
|
||||||
self.remove_from_surname_list(old_person)
|
self.remove_from_surname_list(old_person)
|
||||||
self.add_to_surname_list(person,transaction.batch)
|
self.add_to_surname_list(person,transaction.batch)
|
||||||
else:
|
else:
|
||||||
|
@ -154,15 +154,20 @@ class GrampsInMemDB(GrampsDbBase):
|
|||||||
"""
|
"""
|
||||||
name = str(person.get_primary_name().get_surname())
|
name = str(person.get_primary_name().get_surname())
|
||||||
count = 0
|
count = 0
|
||||||
|
do_remove = True
|
||||||
|
|
||||||
for person_id in iter(self.person_map):
|
for person_id in iter(self.person_map):
|
||||||
p = self.get_person_from_handle(person_id)
|
p = self.get_person_from_handle(person_id)
|
||||||
pn = str(p.get_primary_name().get_surname())
|
pn = str(p.get_primary_name().get_surname())
|
||||||
if pn == name:
|
if pn == name:
|
||||||
count += 1
|
count += 1
|
||||||
if count > 1:
|
if count > 1:
|
||||||
self.surname_list.remove(unicode(name))
|
do_remove = False
|
||||||
break
|
break
|
||||||
|
|
||||||
|
if do_remove:
|
||||||
|
self.surname_list.remove(unicode(name))
|
||||||
|
|
||||||
def _del_person(self,handle):
|
def _del_person(self,handle):
|
||||||
person = self.get_person_from_handle(str(handle))
|
person = self.get_person_from_handle(str(handle))
|
||||||
del self.id_trans[person.get_gramps_id()]
|
del self.id_trans[person.get_gramps_id()]
|
||||||
|
Loading…
Reference in New Issue
Block a user