2942: Note in Family eventref not referenced, also source of attribute of family eventref

svn: r12534
This commit is contained in:
Benny Malengier 2009-05-18 14:01:52 +00:00
parent 0b7d3bcb41
commit afbf70ed3f
2 changed files with 16 additions and 5 deletions

View File

@ -100,12 +100,22 @@ class Attribute(SecondaryObject, PrivacyBase, SourceBase, NoteBase):
""" """
return self.source_list return self.source_list
def get_note_child_list(self):
"""
Return the list of child secondary objects that may refer notes.
@return: Returns the list of child secondary child objects that may
refer notes.
@rtype: list
"""
return self.source_list
def get_handle_referents(self): def get_handle_referents(self):
""" """
Return the list of child objects which may, directly or through Return the list of child objects which may, directly or through
their children, reference primary objects. their children, reference primary objects.
@return: Returns the list of objects refereincing primary objects. @return: Returns the list of objects referencing primary objects.
@rtype: list @rtype: list
""" """
return self.source_list return self.source_list

View File

@ -258,7 +258,8 @@ class Family(SourceBase, NoteBase, MediaBase, AttributeBase, LdsOrdBase,
@rtype: list @rtype: list
""" """
check_list = self.media_list + self.attribute_list + \ check_list = self.media_list + self.attribute_list + \
self.lds_ord_list + self.child_ref_list self.lds_ord_list + self.child_ref_list + \
self.event_ref_list
return check_list return check_list
def get_note_child_list(self): def get_note_child_list(self):
@ -270,7 +271,8 @@ class Family(SourceBase, NoteBase, MediaBase, AttributeBase, LdsOrdBase,
@rtype: list @rtype: list
""" """
check_list = self.media_list + self.attribute_list + \ check_list = self.media_list + self.attribute_list + \
self.lds_ord_list + self.child_ref_list + self.source_list self.lds_ord_list + self.child_ref_list + self.source_list + \
self.event_ref_list
return check_list return check_list
def get_referenced_handles(self): def get_referenced_handles(self):
@ -282,7 +284,6 @@ class Family(SourceBase, NoteBase, MediaBase, AttributeBase, LdsOrdBase,
@rtype: list @rtype: list
""" """
ret = self.get_referenced_note_handles() ret = self.get_referenced_note_handles()
ret += [('Event', ref.ref) for ref in self.event_ref_list]
ret += [('Person', handle) for handle ret += [('Person', handle) for handle
in ([ref.ref for ref in self.child_ref_list] + in ([ref.ref for ref in self.child_ref_list] +
[self.father_handle, self.mother_handle]) [self.father_handle, self.mother_handle])
@ -297,7 +298,7 @@ class Family(SourceBase, NoteBase, MediaBase, AttributeBase, LdsOrdBase,
@return: Returns the list of objects refereincing primary objects. @return: Returns the list of objects refereincing primary objects.
@rtype: list @rtype: list
""" """
return self.get_sourcref_child_list() + self.source_list return self.get_sourcref_child_list() + self.source_list
def set_relationship(self, relationship_type): def set_relationship(self, relationship_type):
""" """