From 665bee278e30e7cca3a027f1b63dd92315e62e48 Mon Sep 17 00:00:00 2001 From: Lachlan Turner Date: Wed, 27 Nov 2024 13:24:56 +1030 Subject: [PATCH 1/2] Change upload logic so that exports are allowed at the current version --- src/export/Cron/Upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/export/Cron/Upload.php b/src/export/Cron/Upload.php index adbbdd6..c6f3d61 100644 --- a/src/export/Cron/Upload.php +++ b/src/export/Cron/Upload.php @@ -44,7 +44,7 @@ public function execute(): void // do not upload any export behind the current version $currentVersion = $this->getCurrentExportedVersion->execute(); if ($currentVersion > 0) { - $collection->addFieldToFilter(ExportInterface::FIELD_VERSION_ID, ['gt' => $currentVersion]); + $collection->addFieldToFilter(ExportInterface::FIELD_VERSION_ID, ['gte' => $currentVersion]); } // order by the version number descending to get the latest export $collection->setOrder(ExportInterface::FIELD_VERSION_ID); From 447da84da5977cd5784a1b01aaf0bd8bd5ba3fa6 Mon Sep 17 00:00:00 2001 From: Lachlan Turner Date: Wed, 27 Nov 2024 13:29:58 +1030 Subject: [PATCH 2/2] Fix condition to use correct shorthand --- src/export/Cron/Upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/export/Cron/Upload.php b/src/export/Cron/Upload.php index c6f3d61..69a9354 100644 --- a/src/export/Cron/Upload.php +++ b/src/export/Cron/Upload.php @@ -44,7 +44,7 @@ public function execute(): void // do not upload any export behind the current version $currentVersion = $this->getCurrentExportedVersion->execute(); if ($currentVersion > 0) { - $collection->addFieldToFilter(ExportInterface::FIELD_VERSION_ID, ['gte' => $currentVersion]); + $collection->addFieldToFilter(ExportInterface::FIELD_VERSION_ID, ['gteq' => $currentVersion]); } // order by the version number descending to get the latest export $collection->setOrder(ExportInterface::FIELD_VERSION_ID);