From f18014c874b6398466709d12de559d1c18ab819e Mon Sep 17 00:00:00 2001 From: Matthieu Gouel Date: Wed, 17 Jul 2024 10:32:35 +0200 Subject: [PATCH] fix cable db selection --- pkg/connector/netbox/database.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/connector/netbox/database.go b/pkg/connector/netbox/database.go index 371c62e..77dd1a0 100644 --- a/pkg/connector/netbox/database.go +++ b/pkg/connector/netbox/database.go @@ -173,7 +173,7 @@ func (db *database) getIPAddresses() ([]*model.IpamIpaddress, error) { func (db *database) getCables() ([]*model.DcimCable, error) { cables := make([]*model.DcimCable, 0) - err := db.pgdb.Model(&cables).Select() + err := db.pgdb.Model(&cables).Relation("Terminations").Select() if err != nil { return nil, fmt.Errorf("select failed: %v", err) }