Skip to content

Commit

Permalink
fix inventory validation
Browse files Browse the repository at this point in the history
  • Loading branch information
tmunzer committed Aug 28, 2024
1 parent 6a1b6d5 commit 2636838
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions internal/resource_org_inventory/org_inventory_resource_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions internal/resource_org_inventory/sdk_to_terraform.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,12 @@ func SdkToTerraform(ctx context.Context, orgId string, data []models.Inventory,
checkVcSiteId(&dev_from_mist, vcmac_to_site)
devices_out = append(devices_out, dev_from_mist)
} else if magic != "" {
diags.AddError(
diags.AddWarning(
"Device not in the Org Inventory",
fmt.Sprintf("Device with Claim Code %s is not in the Org Inventory", magic),
)
} else {
diags.AddError(
diags.AddWarning(
"Device not in the Org Inventory",
fmt.Sprintf("Device with MAC Address %s is not in the Org Inventory", mac),
)
Expand Down

0 comments on commit 2636838

Please sign in to comment.