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:
parent
1945ae26a7
commit
52416ebde4
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue