Skip to content
Snippets Groups Projects
Commit 4016da44 authored by Andre Sterba's avatar Andre Sterba
Browse files

Fix lint errors

See merge request !285
parent 9a91c91c
No related branches found
No related tags found
2 merge requests!285Fix lint errors,!264WIP: Develop
Pipeline #99472 passed
......@@ -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)
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment