From e34fc92c7c3ef53c1f8e6bbe9bf8d9adb73b82ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Thu, 20 Mar 2025 15:44:15 +0100 Subject: [PATCH] PR review changes --- app/config/collections/projects.php | 2 -- .../Platform/Modules/Functions/Http/Deployments/Delete.php | 2 ++ src/Appwrite/Platform/Modules/Sites/Http/Deployments/Delete.php | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/config/collections/projects.php b/app/config/collections/projects.php index ffae763f6b..b209a7ec32 100644 --- a/app/config/collections/projects.php +++ b/app/config/collections/projects.php @@ -623,7 +623,6 @@ return [ 'array' => false, 'filters' => ['datetime'], ], - [ '$id' => ID::custom('latestDeploymentStatus'), 'type' => Database::VAR_STRING, @@ -1125,7 +1124,6 @@ return [ 'array' => false, 'filters' => ['datetime'], ], - [ '$id' => ID::custom('latestDeploymentStatus'), 'type' => Database::VAR_STRING, diff --git a/src/Appwrite/Platform/Modules/Functions/Http/Deployments/Delete.php b/src/Appwrite/Platform/Modules/Functions/Http/Deployments/Delete.php index b5a84c9122..b66ea30bb2 100644 --- a/src/Appwrite/Platform/Modules/Functions/Http/Deployments/Delete.php +++ b/src/Appwrite/Platform/Modules/Functions/Http/Deployments/Delete.php @@ -99,6 +99,8 @@ class Delete extends Action if ($function->getAttribute('latestDeploymentId') === $deployment->getId()) { $latestDeployment = $dbForProject->findOne('deployments', [ + Query::equal('resourceType', ['functions']), + Query::equal('resourceInternalId', [$function->getInternalId()]), Query::orderDesc('$createdAt'), ]); $function = $dbForProject->updateDocument( diff --git a/src/Appwrite/Platform/Modules/Sites/Http/Deployments/Delete.php b/src/Appwrite/Platform/Modules/Sites/Http/Deployments/Delete.php index b6b347bc04..9d30b21a11 100644 --- a/src/Appwrite/Platform/Modules/Sites/Http/Deployments/Delete.php +++ b/src/Appwrite/Platform/Modules/Sites/Http/Deployments/Delete.php @@ -99,6 +99,8 @@ class Delete extends Action if ($site->getAttribute('latestDeploymentId') === $deployment->getId()) { $latestDeployment = $dbForProject->findOne('deployments', [ + Query::equal('resourceType', ['sites']), + Query::equal('resourceInternalId', [$site->getInternalId()]), Query::orderDesc('$createdAt'), ]); $site = $dbForProject->updateDocument(