Skip to content

Commit

Permalink
fix(netbox): properly remove deleted Netbox IPs from local collection
Browse files Browse the repository at this point in the history
  • Loading branch information
pdonias committed Aug 30, 2023
1 parent 63b1ac8 commit 033121e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/xo-server-netbox/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,7 @@ class Netbox {

// Perform calls to Netbox
await this.#request('/ipam/ip-addresses/', 'DELETE', ipsToDelete)
ipsToDelete.forEach(({ id }) => delete nbIps[id])
Object.assign(nbIps, keyBy(await this.#request('/ipam/ip-addresses/', 'POST', ipsToCreate), 'id'))

// Primary IPs -------------------------------------------------------------
Expand Down

0 comments on commit 033121e

Please sign in to comment.