fix(adapter): do not overwrite device alias
This commit is contained in:
parent
97ff229f0e
commit
8017e3cb26
|
|
@ -82,6 +82,13 @@ func (d *Database) CreateDevice(device Device) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ------------------------- Do not overwrite alias ------------------------- */
|
||||||
|
if deviceExistent.Alias != "" {
|
||||||
|
device.Alias = deviceExistent.Alias
|
||||||
|
}
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
callback := func(sessCtx mongo.SessionContext) (interface{}, error) {
|
callback := func(sessCtx mongo.SessionContext) (interface{}, error) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user