Merge pull request #7131 from appwrite/fix-repository-deletion-bug

Only delete repositories linked to the particular project
This commit is contained in:
Torsten Dittmann 2023-11-14 13:25:28 +01:00 committed by GitHub
commit 89c097eed3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -730,6 +730,7 @@ class Deletes extends Action
*/
Console::info("Deleting VCS repositories and comments linked to function " . $functionId);
$this->deleteByGroup('repositories', [
Query::equal('projectInternalId', [$project->getInternalId()]),
Query::equal('resourceInternalId', [$functionInternalId]),
Query::equal('resourceType', ['function']),
], $dbForConsole, function (Document $document) use ($dbForConsole) {