fix: respect include inactive deployments option

Use the resources array to determine whether to export only the active
deployment or all deployments. When deployment/site-deployment resource
type is included, export all deployments instead of only the active one.
This commit is contained in:
Prem Palanisamy authored and premtsd-code committed 2026-03-02 09:57:11 +00:00
1 parent 037bf4b381
commit b9b1ec1b64
1 file changed
+4 -6
+4 -6
View File
@@ -1518,9 +1518,8 @@ class Appwrite extends Source
}
try {
if (\in_array(Resource::TYPE_DEPLOYMENT, $resources)) {
$this->exportDeployments($batchSize, true);
}
$exportOnlyActive = !\in_array(Resource::TYPE_DEPLOYMENT, $resources);
$this->exportDeployments($batchSize, $exportOnlyActive);
} catch (\Throwable $e) {
$this->addError(new Exception(
Resource::TYPE_DEPLOYMENT,
@@ -1549,9 +1548,8 @@ class Appwrite extends Source
}
try {
if (\in_array(Resource::TYPE_SITE_DEPLOYMENT, $resources)) {
$this->exportSiteDeployments($batchSize, true);
}
$exportOnlyActive = !\in_array(Resource::TYPE_SITE_DEPLOYMENT, $resources);
$this->exportSiteDeployments($batchSize, $exportOnlyActive);
} catch (\Throwable $e) {
$this->addError(new Exception(
Resource::TYPE_SITE_DEPLOYMENT,