From 4360572745a929c7c4f6266ec03d4eba77a9715c Mon Sep 17 00:00:00 2001 From: Manuel Astudillo Date: Sat, 14 Dec 2024 19:35:27 +0100 Subject: [PATCH] fix(scripts): make sure jobs fields are not empty before unpack --- src/commands/includes/updateJobFields.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/includes/updateJobFields.lua b/src/commands/includes/updateJobFields.lua index 9d9057f21a..d2c5f2944d 100644 --- a/src/commands/includes/updateJobFields.lua +++ b/src/commands/includes/updateJobFields.lua @@ -2,7 +2,7 @@ Function to update a bunch of fields in a job. ]] local function updateJobFields(jobKey, msgpackedFields) - if msgpackedFields then + if msgpackedFields and #msgpackedFields > 0 then local fieldsToUpdate = cmsgpack.unpack(msgpackedFields) if fieldsToUpdate then redis.call("HMSET", jobKey, unpack(fieldsToUpdate))