redirects all links to self (the new linked object)

def update_link(self):
        """
        redirects all links to self (the new linked object)
        """
        name = repr(self)
        if not name:
            return self
        l = self.__class__._get_links()
        to_be_changed = list()
        if name in l:

            for wal in l[name]:
                if wal.ref_obj and self is not wal():
                    to_be_changed.append((wal.ref_obj, wal.attr))

        for o, a in to_be_changed:
            setattr(o, a, self)

        self.clean_up_link_dict()
        return self