mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
fix: skip paginated export for functions/sites with no active deployment
When exportOnlyActive is true, functions/sites without an active deployment ID should be skipped entirely rather than falling back to the full paginated listing.
This commit is contained in:
1 parent
f27276bb8b
commit
0766cd935a
1 file changed
+14
-4
@@ -1641,8 +1641,13 @@ class Appwrite extends Source
|
||||
/** @var Func $func */
|
||||
$lastDocument = null;
|
||||
|
||||
if ($exportOnlyActive && $func->getActiveDeployment()) {
|
||||
$deployment = $this->functions->getDeployment($func->getId(), $func->getActiveDeployment());
|
||||
if ($exportOnlyActive) {
|
||||
$activeDeploymentId = $func->getActiveDeployment();
|
||||
if (empty($activeDeploymentId)) {
|
||||
continue; // active-only mode: nothing to export for this function
|
||||
}
|
||||
|
||||
$deployment = $this->functions->getDeployment($func->getId(), $activeDeploymentId);
|
||||
|
||||
try {
|
||||
$this->exportDeploymentData($func, $deployment);
|
||||
@@ -1863,8 +1868,13 @@ class Appwrite extends Source
|
||||
/** @var Site $site */
|
||||
$lastDocument = null;
|
||||
|
||||
if ($exportOnlyActive && $site->getActiveDeployment()) {
|
||||
$deployment = $this->sites->getDeployment($site->getId(), $site->getActiveDeployment());
|
||||
if ($exportOnlyActive) {
|
||||
$activeDeploymentId = $site->getActiveDeployment();
|
||||
if (empty($activeDeploymentId)) {
|
||||
continue; // active-only mode: nothing to export for this site
|
||||
}
|
||||
|
||||
$deployment = $this->sites->getDeployment($site->getId(), $activeDeploymentId);
|
||||
|
||||
try {
|
||||
$this->exportSiteDeploymentData($site, $deployment);
|
||||
|
||||
Reference in new issue
Block a user