mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
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:
1 parent
037bf4b381
commit
b9b1ec1b64
1 file changed
+4
-6
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user