Skip to content

Commit

Permalink
fix inventory issue when device has been manually unclaim
Browse files Browse the repository at this point in the history
  • Loading branch information
tmunzer committed Nov 4, 2024
1 parent 6609a09 commit bee3fae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/resource_org_inventory/sdk_to_terraform.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,16 +224,16 @@ func processSync(
checkVcSiteId(deviceFromMist, mistSiteIdByVcMac)
deviceFromMist.UnclaimWhenDestroyed = device.UnclaimWhenDestroyed
newStateDevices[deviceInfo] = deviceFromMist
} else {
diags.AddError("Device not found", fmt.Sprintf("Unable to find device with the Claim Code \"%s\" in the Org Inventory", deviceInfo))
//} else {
// diags.AddError("Device not found", fmt.Sprintf("Unable to find device with the Claim Code \"%s\" in the Org Inventory", deviceInfo))
}
} else if isMac {
if deviceFromMist, ok := (*mistDevicesByMac)[strings.ToUpper(deviceInfo)]; ok {
checkVcSiteId(deviceFromMist, mistSiteIdByVcMac)
deviceFromMist.UnclaimWhenDestroyed = device.UnclaimWhenDestroyed
newStateDevices[deviceInfo] = deviceFromMist
} else {
diags.AddError("Device not found", fmt.Sprintf("Unable to find device with the MAC Address \"%s\" in the Org Inventory", deviceInfo))
//} else {
// diags.AddError("Device not found", fmt.Sprintf("Unable to find device with the MAC Address \"%s\" in the Org Inventory", deviceInfo))
}
} else {
diags.AddError(
Expand Down

0 comments on commit bee3fae

Please sign in to comment.