From 0d2c8d8b3950e75e1c565e959e24a4c138f41fb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 1 Mar 2022 15:09:21 +0000 Subject: [PATCH] Fix activate pram --- app/controllers/api/functions.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/controllers/api/functions.php b/app/controllers/api/functions.php index d2b273aa41..83bc64d3eb 100644 --- a/app/controllers/api/functions.php +++ b/app/controllers/api/functions.php @@ -558,10 +558,9 @@ App::post('/v1/functions/:functionId/deployments') throw new Exception('Failed moving file', 500, Exception::GENERAL_SERVER_ERROR); } + $activate = (bool) filter_var($activate, FILTER_VALIDATE_BOOLEAN); + if($chunksUploaded === $chunks) { - - $activate = (bool) filter_var($activate, FILTER_VALIDATE_BOOLEAN); - if ($activate) { // Remove deploy for all other deployments. $activeDeployments = $dbForProject->find('deployments', [