when deleting a URL via API, perform_delete should call delete on the… by dogboat · Pull Request #14612 · DefectDojo/django-DefectDojo

This PR updates the URL API endpoint to correct a bug discovered by @blakeaowens; it implements his solution.

Previously, deleting a URL object through the API deleted the URL object itself, leaving a dangling AbstractLocation entry. The fix is simple enough: override the URLViewSet's perform_destroy() method to call .delete() on the instance's AbstractLocation reference instead. This will cascade to the URL.