From 9d4fdd0646dac61730f33d032b53f6dbf3e71d9e Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Wed, 15 Jan 2014 09:31:49 +0100 Subject: [PATCH] 7157: better support for objects having citations as subobjects --- gramps/gen/lib/citationbase.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gramps/gen/lib/citationbase.py b/gramps/gen/lib/citationbase.py index 72883aa16..5dc04ae7b 100644 --- a/gramps/gen/lib/citationbase.py +++ b/gramps/gen/lib/citationbase.py @@ -171,6 +171,8 @@ class CitationBase(object): for item in self.get_citation_child_list(): list += item.get_citation_list() + for subitem in item.get_citation_child_list(): + list += subitem.get_citation_list() return list def has_citation_reference(self, citation_handle): @@ -309,3 +311,13 @@ class IndirectCitationBase(object): """ for item in self.get_citation_child_list(): item.remove_citation_references(citation_handle_list) + + def get_citation_list(self): + """ + Return the list of :class:`~gen.lib.citation.Citation` handles + associated with the object. For an IndirectCitationBase this is always + the empty list + :returns: The list of :class:`~gen.lib.citation.Citation` handles + :rtype: list + """ + return []