mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-27 08:15:19 +02:00
Allow group name change (#795)
* fix bug on email separator Signed-off-by: Denis barbaron <denis.barbaron@orange.com> * allow group name change Signed-off-by: Denis barbaron <denis.barbaron@orange.com> --------- Signed-off-by: Denis barbaron <denis.barbaron@orange.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright © 2019 code initially contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
|
||||
* Copyright © 2019-2024 code initially contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
|
||||
**/
|
||||
|
||||
const wirerouter = require('../../../wire/router')
|
||||
@@ -66,7 +66,6 @@ module.exports = function(push, pushdev, channelRouter) {
|
||||
|
||||
delete device.channel
|
||||
delete device.owner
|
||||
delete device.group.id
|
||||
delete device.group.lifeTime
|
||||
return device
|
||||
}
|
||||
@@ -117,7 +116,7 @@ module.exports = function(push, pushdev, channelRouter) {
|
||||
, 'model'
|
||||
, 'operator'
|
||||
, 'manufacturer'
|
||||
, {group: ['id', 'origin', 'originName', 'lifeTime']}
|
||||
, {group: ['id', 'name', 'origin', 'originName', 'lifeTime', 'owner']}
|
||||
, {provider: ['name']}
|
||||
, {network: ['type', 'subtype']}
|
||||
, {display: ['height', 'width']}
|
||||
@@ -154,7 +153,9 @@ module.exports = function(push, pushdev, channelRouter) {
|
||||
data.new_val.network.type !== data.old_val.network.type ||
|
||||
data.new_val.network.subtype !== data.old_val.network.subtype
|
||||
) ||
|
||||
data.new_val.provider.name !== data.old_val.provider.name) {
|
||||
data.new_val.provider.name !== data.old_val.provider.name ||
|
||||
data.new_val.group.name !== data.old_val.group.name ||
|
||||
data.new_val.group.originName !== data.old_val.group.originName) {
|
||||
sendDeviceChange(data.new_val, data.old_val, 'updated')
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user