if filter is nil.

This commit is contained in:
Kalle Carlbark 2019-09-11 20:59:08 +02:00
parent 7fb13bea74
commit 315815cf9d
No known key found for this signature in database
GPG key ID: 3FC0C93C5A5A0670

View file

@ -198,8 +198,7 @@ func (n *NetBox) ListDevices(d *Dcim_Devices_List, f *DeviceFilter) error {
Transport: transport,
}
deviceurl := n.RootURL + "/api/devices/"
if (&DeviceFilter{} != f) {
fmt.Println("hoj")
if f != nil {
form := url.Values{}
err := encoder.Encode(f, form)
if err != nil {