def _closure_deletelink(self, oldparentpk):
        """Remove incorrect links from the closure tree."""
        self._closure_model.objects.filter(
            **{
                "parent__%s__child" % self._closure_parentref(): oldparentpk,
                "child__%s__parent" % self._closure_childref(): self.pk
            }
        ).delete()
dataset/ETHPy150Open ocadotechnology/django-closuretree/closuretree/models.py/ClosureModel._closure_deletelink/original