'Return the list of new topics that apply to this document.
If the document has a parent, it inherits the parent\'s topics.'

def get_topics(self):

    if self.parent:
        return self.parent.get_topics()
    return Topic.objects.filter(document=self)
