From c2145e49e313db5f9897d9c5ba19fa23cd0c95d8 Mon Sep 17 00:00:00 2001 From: Erik Thayer Date: Tue, 10 Jan 2017 11:31:48 -0600 Subject: [PATCH] falsy code check --- smartapps/ethayer/lock-manager.src/lock-manager.groovy | 2 +- smartapps/ethayer/lock-user.src/lock-user.groovy | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/smartapps/ethayer/lock-manager.src/lock-manager.groovy b/smartapps/ethayer/lock-manager.src/lock-manager.groovy index 91c9031..983da00 100755 --- a/smartapps/ethayer/lock-manager.src/lock-manager.groovy +++ b/smartapps/ethayer/lock-manager.src/lock-manager.groovy @@ -186,7 +186,7 @@ def removeUnmanagedCodes(evt) { if (!child) { def currentCode = codeData."code${slot}" // there is no app associated - if (currentCode != '') { + if (currentCode) { // Code is set, We should be disabled. array << ["code${slot}", ''] } diff --git a/smartapps/ethayer/lock-user.src/lock-user.groovy b/smartapps/ethayer/lock-user.src/lock-user.groovy index 440495c..0abc540 100755 --- a/smartapps/ethayer/lock-user.src/lock-user.groovy +++ b/smartapps/ethayer/lock-user.src/lock-user.groovy @@ -693,7 +693,7 @@ def pollCodeReport(evt) { array << ["code${userSlot}", userCode] } } else { - if (currentCode != '') { + if (currentCode) { // Code is set, We should be disabled. array << ["code${userSlot}", ''] }