Start childref conversion

svn: r6327
This commit is contained in:
Don Allingham
2006-04-13 16:16:00 +00:00
parent fbd8b4546c
commit f477a3cdf3
14 changed files with 486 additions and 68 deletions

View File

@@ -140,7 +140,7 @@ class ChildRef(BaseObject,PrivacyBase,SourceBase,NoteBase,RefBase):
def set_father_relation(self,frel):
"""Sets relation between the person and father"""
self.fmrel = rel
self.frel = frel
def get_father_relation(self):
"""Returns the relation between the person and father"""

View File

@@ -377,6 +377,7 @@ class Family(PrimaryObject,SourceBase,NoteBase,MediaBase,AttributeBase,
"""
if child_ref and not isinstance(child_ref,ChildRef):
raise ValueError("expecting ChildRef instance")
assert(child_ref.ref)
self.child_ref_list.append(child_ref)
def remove_child_ref(self,child_ref):

View File

@@ -46,6 +46,7 @@ from _ChildRef import ChildRef
# Primary objects
from _PrimaryObject import PrimaryObject
from _Person import Person
from _PersonRef import PersonRef
from _Family import Family
from _Event import Event
from _Place import Place