Extend device status action for q or later

This commit is contained in:
Jonas L
2019-06-03 00:00:00 +00:00
parent 65200e83c2
commit 46af33f2cd
3 changed files with 30 additions and 4 deletions
@@ -140,6 +140,14 @@ export async function dispatchUpdateDeviceStatus ({ deviceId, action, cache }: {
deviceEntry.didReboot = true
}
if (action.isQOrLaterNow) {
const hasChanged = deviceEntry.isQorLater === false
if (hasChanged) {
deviceEntry.isQorLater = true
}
}
await deviceEntry.save({ transaction: cache.transaction })
if (hasDeviceManipulation(deviceEntry)) {