Skip to content

Commit

Permalink
fix: fix post delete signal
Browse files Browse the repository at this point in the history
to correspond the new relations model
  • Loading branch information
gythaogg committed Nov 13, 2024
1 parent c28d700 commit e58ac5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apis_ontology/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit e58ac5e

Please sign in to comment.