Fix handle errors in person and family editors
This commit is contained in:
parent
03a72b8319
commit
f7c54e9b88
@ -769,9 +769,8 @@ class EditPerson(EditPrimary):
|
|||||||
f.set_child_ref_list(new_order)
|
f.set_child_ref_list(new_order)
|
||||||
|
|
||||||
error = False
|
error = False
|
||||||
|
if not self.added:
|
||||||
original = self.db.get_person_from_handle(self.obj.handle)
|
original = self.db.get_person_from_handle(self.obj.handle)
|
||||||
|
|
||||||
if original:
|
|
||||||
(female, male, unknown) = _select_gender[self.obj.get_gender()]
|
(female, male, unknown) = _select_gender[self.obj.get_gender()]
|
||||||
if male and original.get_gender() != Person.MALE:
|
if male and original.get_gender() != Person.MALE:
|
||||||
for tmp_handle in self.obj.get_family_handle_list():
|
for tmp_handle in self.obj.get_family_handle_list():
|
||||||
|
@ -347,14 +347,12 @@ class EditPrimary(ManagedWindow, DbGUIElement):
|
|||||||
Return True if a duplicate GRAMPS ID has been detected.
|
Return True if a duplicate GRAMPS ID has been detected.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
original = None
|
idval = self.obj.get_gramps_id()
|
||||||
if self.obj.get_handle():
|
existing = self.get_from_gramps_id(idval)
|
||||||
original = self.get_from_handle(self.obj.get_handle())
|
if existing:
|
||||||
if original and original.get_gramps_id() == self.obj.get_gramps_id():
|
if existing.get_handle() == self.obj.get_handle():
|
||||||
return (False, 0)
|
return (False, 0)
|
||||||
else:
|
else:
|
||||||
idval = self.obj.get_gramps_id()
|
|
||||||
if self.get_from_gramps_id(idval):
|
|
||||||
return (True, idval)
|
return (True, idval)
|
||||||
|
else:
|
||||||
return (False, 0)
|
return (False, 0)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user