From 49c0210c3f4e8838ee62393a9209f76634be3c20 Mon Sep 17 00:00:00 2001
From: Fabian Seidl <fabian.b.seidl@stud.h-da.de>
Date: Wed, 13 Jul 2022 15:30:56 +0200
Subject: [PATCH] removed possibly unneccessary device copy

---
 controller/nucleus/principalNetworkDomain.go | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/controller/nucleus/principalNetworkDomain.go b/controller/nucleus/principalNetworkDomain.go
index 871bab11b..af588ae77 100644
--- a/controller/nucleus/principalNetworkDomain.go
+++ b/controller/nucleus/principalNetworkDomain.go
@@ -278,15 +278,7 @@ func (pnd *pndImplementation) GetDevice(identifier string) (device.Device, error
 		return nil, err
 	}
 
-	// TODO: We should investigate why we copy the device here.
-	copiedDevice := &CommonDevice{
-		name:  d.Name(),
-		UUID:  d.ID(),
-		Model: d.GetModel(),
-		sbi:   d.SBI(),
-	}
-
-	return copiedDevice, nil
+	return d, nil
 }
 
 // RemoveDevice removes a device from the PND
-- 
GitLab