From 8921cfe53745ee1f8a4add1ba0f92fe00dd6f853 Mon Sep 17 00:00:00 2001 From: Victor Lyuboslavsky Date: Fri, 14 Jun 2024 07:08:54 -0500 Subject: [PATCH] Code review fixes. (#19755) Fixes from #19720 code review --- server/datastore/mysql/scripts.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/datastore/mysql/scripts.go b/server/datastore/mysql/scripts.go index efac957e3c..67c223f01f 100644 --- a/server/datastore/mysql/scripts.go +++ b/server/datastore/mysql/scripts.go @@ -1040,11 +1040,11 @@ func buildHostLockWipeStatusUpdateStmt(refCol string, succeeded bool, joinPart s // lock request does generate the PIN and store it there to be used by an // eventual unlock. if !setUnlockRef { + stmt += fmt.Sprintf("%sunlock_ref = NULL, %[1]swipe_ref = NULL", alias) + } else { // Currently only used for Apple MDM devices. // We set the unlock_ref to current time since the device can be unlocked any time after the lock. // Apple MDM does not have a concept of unlock pending. - stmt += fmt.Sprintf("%sunlock_ref = NULL, %[1]swipe_ref = NULL", alias) - } else { stmt += fmt.Sprintf("%sunlock_ref = '%s', %[1]swipe_ref = NULL", alias, time.Now().Format(time.DateTime)) } case "unlock_ref":