gen.db.base: protection from missing parent

This commit is contained in:
Doug Blank 2015-08-09 15:16:26 -04:00
parent ea591bfb17
commit 46229b2e27

View File

@ -1747,8 +1747,9 @@ class DbWriteBase(DbReadBase):
self.find_backlink_handles(family_handle, ['Person'])]
for phandle in person_list:
person = self.get_person_from_handle(phandle)
person.remove_handle_references('Family', [family_handle])
self.commit_person(person, trans)
if person:
person.remove_handle_references('Family', [family_handle])
self.commit_person(person, trans)
self.remove_family(family_handle, trans)
def remove_parent_from_family(self, person_handle, family_handle,