* src/GrampsBSDDB.py: fix remove_person and count_person

* src/GrampsInMemDB.py: fix remove_person and count_person


svn: r3566
This commit is contained in:
Don Allingham 2004-09-21 03:17:07 +00:00
parent a133a3d6c0
commit f0fbb72dc4
3 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,7 @@
2004-09-20 Don Allingham <dallingham@users.sourceforge.net>
* src/GrampsBSDDB.py: fix remove_person and count_person
* src/GrampsInMemDB.py: fix remove_person and count_person
2004-09-20 Alex Roitman <shura@alex.neuro.umn.edu>
* src/DateEdit.py (DateEdit.invoke_date_editor):
Check the built date and display LED (closes # 1031065).

View File

@ -172,11 +172,11 @@ class GrampsBSDDB(GrampsDbBase):
return vals
def remove_person(self,handle,transaction):
self.genderStats.uncount_person (self.person_map[handle])
person = self.get_person_from_handle(handle)
self.genderStats.uncount_person (person)
if transaction != None:
old_data = self.person_map.get(handle)
transaction.add(PERSON_KEY,handle,old_data)
self.person_map.delete(handle)
transaction.add(PERSON_KEY,handle,person.serialize())
self.person_map.delete(str(handle))
def remove_source(self,handle,transaction):
if transaction != None:
@ -200,7 +200,7 @@ class GrampsBSDDB(GrampsDbBase):
if transaction != None:
old_data = self.place_map.get(handle)
transaction.add(PLACE_KEY,handle,old_data)
self.place_map.delete(handle)
self.place_map.delete(str(handle))
def get_person_from_gramps_id(self,val):
"""finds a Person in the database from the passed gramps' ID.

View File

@ -79,7 +79,8 @@ class GrampsInMemDB(GrampsDbBase):
return vals
def remove_person(self,handle,transaction):
self.genderStats.uncount_person (self.person_map[handle])
person = self.get_person_from_handle(handle)
self.genderStats.uncount_person (person)
if transaction != None:
old_data = self.person_map.get(handle)
transaction.add(PERSON_KEY,handle,old_data)