Remove has_source_reference because it is only used in mergesource, and it is better to make the test directly, because only citations have source references and they only have one reference.

svn: r18417
This commit is contained in:
Tim G L Lyons
2011-11-08 17:39:17 +00:00
parent ee77b6882e
commit b4f434357f
7 changed files with 3 additions and 82 deletions

View File

@@ -152,23 +152,6 @@ class EventRef(SecondaryObject, PrivacyBase, NoteBase, AttributeBase, RefBase):
"""
return self.get_citation_child_list()
def has_source_reference(self, src_handle) :
"""
Return True if any of the child objects has reference to this source
handle.
:param src_handle: The source handle to be checked.
:type src_handle: str
:returns: Returns whether any of it's child objects has reference to
this source handle.
:rtype: bool
"""
for item in self.get_sourcref_child_list():
if item.has_source_reference(src_handle):
return True
return False
def remove_source_references(self, src_handle_list):
"""
Remove references to all source handles in the list in all child