diff --git a/controller/nucleus/databaseDeviceStore.go b/controller/nucleus/databaseDeviceStore.go index 0d108f29561db10844edadfdf161f8c2fc281ace..cb6af812ef2c0050b98f3f8c2d74ccffb7a050f2 100644 --- a/controller/nucleus/databaseDeviceStore.go +++ b/controller/nucleus/databaseDeviceStore.go @@ -45,7 +45,7 @@ func (s *DatabaseDeviceStore) Get(query store.Query) (device.Device, error) { collection := db.Collection(s.storeName) result := collection.FindOne(ctx, bson.D{primitive.E{Key: "_id", Value: query.ID}}) if result == nil { - return nil, errors.ErrCouldNotFind{StoreName: pndStoreName} + return nil, errors.ErrCouldNotFind{StoreName: deviceStoreName} } err := result.Decode(&loadedDevice) diff --git a/controller/nucleus/device.go b/controller/nucleus/device.go index 100666727f4ebb154b386bd604c037367199a067..df0c67c5888621f2a74df33fe6529e4d70511743 100644 --- a/controller/nucleus/device.go +++ b/controller/nucleus/device.go @@ -33,9 +33,9 @@ func NewDevice(name string, uuidInput uuid.UUID, opt *tpb.TransportOption, sbi s name = namesgenerator.GetRandomName(0) } - // We want a representation of the OND's config (the SBI-schema's root created through ygot), - // but do not want to work on the sbi.Schema() directly. - // So the root of sbi.Schema() is never changed when a set or get on a device will be called. + // We want a representation of the OND's config (the SBI-schema's root created through ygot), + // but do not want to work on the sbi.Schema() directly. + // So the root of sbi.Schema() is never changed when a set or get on a device will be called. root, err := ygot.DeepCopy(sbi.Schema().Root) if err != nil { return nil, err