From e58ac5e28371264fe96cb5c1c8434bbedd4a0d50 Mon Sep 17 00:00:00 2001 From: Gytha Ogg Date: Wed, 13 Nov 2024 16:47:26 +0100 Subject: [PATCH] fix: fix post delete signal to correspond the new relations model --- apis_ontology/signals.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apis_ontology/signals.py b/apis_ontology/signals.py index 07b6317..f284267 100644 --- a/apis_ontology/signals.py +++ b/apis_ontology/signals.py @@ -17,5 +17,5 @@ def add_to_group(sender, user, request, **kwargs): @receiver(pre_delete, sender=RootObject) def cascade_delete_related(sender, instance, **kwargs): - Relation.objects.filter(subj=instance).delete() - Relation.objects.filter(obj=instance).delete() + Relation.objects.filter(subj_object_id=instance.pk).delete() + Relation.objects.filter(obj_object_id=instance.pk).delete()