1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 19:42:01 +02:00

Remove device owner if device is not present.

This commit is contained in:
Simo Kinnunen 2014-03-19 18:06:34 +09:00
parent 1945ae26a7
commit 52416ebde4

View file

@ -121,6 +121,9 @@ module.exports = function(options) {
list.forEach(function(device) {
datautil.applyData(device)
datautil.applyOwner(device, req.user)
if (!device.present) {
device.owner = null
}
})
res.json({
success: true
@ -144,6 +147,9 @@ module.exports = function(options) {
list.forEach(function(device) {
datautil.applyData(device)
datautil.applyOwner(device, req.user)
if (!device.present) {
device.owner = null
}
})
res.json({
success: true
@ -165,6 +171,9 @@ module.exports = function(options) {
if (device) {
datautil.applyData(device)
datautil.applyOwner(device, req.user)
if (!device.present) {
device.owner = null
}
res.json({
success: true
, device: device