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(