Skip to content

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

Merged
Maffooch merged 2 commits into
DefectDojo:bugfixfrom
dogboat:url-delete
Apr 3, 2026
Merged

when deleting a URL via API, perform_delete should call delete on the…#14612
Maffooch merged 2 commits into
DefectDojo:bugfixfrom
dogboat:url-delete

Conversation

@dogboat

@dogboat dogboat commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

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

@mtesauro mtesauro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved

@Maffooch
Maffooch merged commit b127bb1 into DefectDojo:bugfix Apr 3, 2026
157 checks passed
@dogboat
dogboat deleted the url-delete branch May 20, 2026 18:10
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