'Return Link for legend or None if it does not exist.'

def get_legend(self):

    try:
        legends_link = self.link_set.get(name='Legend')
    except Link.DoesNotExist:
        return None
    except Link.MultipleObjectsReturned:
        return None
    else:
        return legends_link
