BatmanAMA / powerbox

Netbox powershell module
MIT License
48 stars 18 forks source link

Set-nbObject LookUps not working #30

Open steinbachio opened 5 years ago

steinbachio commented 5 years ago

In Set-nbObject.ps1

it is checking, if it needs to lookup for the value.

line 111-113:

Is

if ($name -in $lookup.keys) {
    $value = ConvertTo-nbID -source $value -value $name
}

Should be

if ($name -in $lookup.keys) {
    $value = ConvertTo-nbID -source $lookup[$name] -value $value
}

This result in lookups on not existing urls.

BatmanAMA commented 5 years ago

You are totally right! Thanks for the report. I'll push out a patch as I have a few other bugs to fix too. Thanks for the report!