fix vcsRepos deletion
This commit is contained in:
parent
0ed2723f00
commit
c9ce7e60cf
2 changed files with 11 additions and 2 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 42938250c6ee923d88d6f5b3c04484712a5a176f
|
||||
Subproject commit 265fb01f80a9233c11e5cdaa0b85974a285cc8cf
|
|
@ -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 = '';
|
||||
|
|
Loading…
Reference in a new issue