Skip to content

Commit d7b5175

Browse files
committed
Apply rootResourceId/rootResourceType guard in exportPlatforms
1 parent 4fc5fc3 commit d7b5175

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/Migration/Sources/Appwrite.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2326,6 +2326,11 @@ private function exportPlatforms(int $batchSize): void
23262326
while (true) {
23272327
$queries = [Query::limit($batchSize)];
23282328

2329+
if ($this->rootResourceId !== '' && $this->rootResourceType === Resource::TYPE_PLATFORM) {
2330+
$queries[] = Query::equal('$id', $this->rootResourceId);
2331+
$queries[] = Query::limit(1);
2332+
}
2333+
23292334
if ($lastId !== null) {
23302335
$queries[] = Query::cursorAfter($lastId);
23312336
}

0 commit comments

Comments
 (0)