Skip to content

Commit 3ac9a19

Browse files
committed
when deleting a URL via API, perform_delete should call delete on the abstractlocation instance (cascades down)
1 parent 8ead201 commit 3ac9a19

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

dojo/url/api/views.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,6 @@ def get_queryset(self) -> QuerySet[URL]:
3636
return URL.objects.annotate(
3737
active_findings=Coalesce(active_finding_subquery, Value(0)),
3838
)
39+
40+
def perform_destroy(self, instance):
41+
instance.location.delete()

0 commit comments

Comments
 (0)