fix: unlnk deleted networks and tags from enrollment keys (#3328)

This commit is contained in:
Aceix
2025-02-24 05:22:18 +00:00
committed by GitHub
parent f46030e40f
commit 2fcdd865c8
2 changed files with 58 additions and 1 deletions

View File

@@ -464,6 +464,7 @@ func deleteNetwork(w http.ResponseWriter, r *http.Request) {
logic.ReturnErrorResponse(w, r, logic.FormatError(err, errtype))
return
}
go logic.UnlinkNetworkAndTagsFromEnrollmentKeys(network, true)
go logic.DeleteNetworkRoles(network)
go logic.DeleteDefaultNetworkPolicies(models.NetworkID(network))
//delete network from allocated ip map