mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix vcsRepos deletion
This commit is contained in:
+1
-1
Submodule app/console updated: 42938250c6...265fb01f80
@@ -568,7 +568,16 @@ App::put('/v1/functions/:functionId')
|
||||
|
||||
// Git disconnect logic
|
||||
if ($isConnected && empty($vcsRepositoryId)) {
|
||||
$dbForConsole->deleteDocument('vcsRepos', $function->getAttribute('vcsRepositoryId', ''));
|
||||
$repoDocs = $dbForConsole->find('vcsRepos', [
|
||||
Query::equal('projectId', [$project->getId()]),
|
||||
Query::equal('resourceId', [$functionId]),
|
||||
Query::equal('resourceType', ['function']),
|
||||
Query::limit(100),
|
||||
]);
|
||||
|
||||
foreach ($repoDocs as $repoDoc) {
|
||||
$dbForConsole->deleteDocument('vcsRepos', $repoDoc->getId());
|
||||
}
|
||||
|
||||
$vcsRepositoryId = '';
|
||||
$vcsInstallationId = '';
|
||||
|
||||
Reference in New Issue
Block a user