Fix asset deletion cleanup for attached monitors #19
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Deleting an asset should remove monitors attached to that asset, matching the UI confirmation copy. Reproduction against the dev API returned 204 for DELETE /assets/{id}, removed the asset, but left the attached monitor behind.
Scope:
Implemented in the local working tree: DELETE /assets/{id} now explicitly resolves open incidents tied to attached monitors, detaches incident asset/monitor references, deletes attached monitors, then deletes the asset. Added a backend regression test and verified the running dev API removes both asset and attached monitor. Leaving open until review/commit.
Completed by commit
e59733d: asset deletion now resolves/detaches related incidents, deletes attached monitors, and includes regression coverage.