mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
(fix): skip orphan projects and cleanup repositories
This commit is contained in:
@@ -69,7 +69,9 @@ trait Deployment
|
||||
$project = $authorization->skip(fn () => $dbForPlatform->getDocument('projects', $projectId));
|
||||
|
||||
if ($project->isEmpty()) {
|
||||
throw new Exception(Exception::PROJECT_NOT_FOUND, 'Repository references non-existent project');
|
||||
Console::warning("Repository {$repositoryId} references non-existent project {$projectId}, cleaning up");
|
||||
$authorization->skip(fn () => $dbForPlatform->deleteDocument('repositories', $repositoryId));
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->beforeCreateGitDeployment($project, $repository, $dbForPlatform, $authorization);
|
||||
|
||||
Reference in New Issue
Block a user