Skip to content

when deleting a URL via API, perform_delete should call delete on the…#14612

Open
dogboat wants to merge 2 commits intoDefectDojo:bugfixfrom
dogboat:url-delete
Open

when deleting a URL via API, perform_delete should call delete on the…#14612
dogboat wants to merge 2 commits intoDefectDojo:bugfixfrom
dogboat:url-delete

Conversation

@dogboat
Copy link
Copy Markdown
Contributor

@dogboat dogboat commented Mar 30, 2026

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.

@valentijnscholten valentijnscholten added this to the 2.57.0 milestone Apr 1, 2026
Copy link
Copy Markdown
Contributor

@mtesauro mtesauro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants