* src/RelLib/_Person.py (set_birth_ref,set_death_ref): Dont fail if setting to None (which is what Check.py does).

* src/plugins/TestcaseGenerator.py: Make it work again + some enhancements



svn: r7668
This commit is contained in:
Martin Hawlisch
2006-11-22 15:27:31 +00:00
parent 0b3be56b7a
commit 876e0716c5
3 changed files with 167 additions and 83 deletions

View File

@@ -431,7 +431,9 @@ class Person(PrimaryObject,SourceBase,NoteBase,MediaBase,
"""
if event_ref and not isinstance(event_ref, EventRef):
raise ValueError("Expecting EventRef instance")
if event_ref == None:
self.birth_ref_index = -1
return
# check whether we already have this ref in the list
matches = [event_ref.is_equal(ref) for ref in self.event_ref_list]
try:
@@ -452,6 +454,9 @@ class Person(PrimaryObject,SourceBase,NoteBase,MediaBase,
"""
if event_ref and not isinstance(event_ref, EventRef):
raise ValueError("Expecting EventRef instance")
if event_ref == None:
self.death_ref_index = -1
return
# check whether we already have this ref in the list
matches = [event_ref.is_equal(ref) for ref in self.event_ref_list]
try: