mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:03:30 +02:00
Probably fix "using" issues.
This commit is contained in:
@@ -25,6 +25,11 @@ module.exports = function DeviceServiceFactory($rootScope, $http, socket) {
|
||||
data.usable = data.present && data.status === 3 && data.ready &&
|
||||
(!data.owner || data.using)
|
||||
|
||||
// Make sure we don't mistakenly think we still have the device
|
||||
if (!data.usable) {
|
||||
data.using = false
|
||||
}
|
||||
|
||||
// For convenience, formulate an aggregate state property that covers
|
||||
// every possible state.
|
||||
data.state = 'absent'
|
||||
|
||||
Reference in New Issue
Block a user