From b0f154424b352a8cb98200f431f5da07bf58d823 Mon Sep 17 00:00:00 2001 From: Lachlan Turner Date: Wed, 27 Nov 2024 11:25:04 +1030 Subject: [PATCH] Invalidate both full and incremental exports in pending or uploaded status --- src/export/Model/InvalidateExports.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/export/Model/InvalidateExports.php b/src/export/Model/InvalidateExports.php index c55f197..f49d702 100644 --- a/src/export/Model/InvalidateExports.php +++ b/src/export/Model/InvalidateExports.php @@ -39,8 +39,14 @@ public function execute(): void /** @var Collection $collection */ $collection = $this->collectionFactory->create(); // need to check pending and uploaded exports only - $collection->addFieldToFilter(ExportInterface::FIELD_STATUS, ExportInterface::STATUS_PENDING); - $collection->addFieldToFilter(ExportInterface::FIELD_EXPORT_TYPE, ExportInterface::EXPORT_TYPE_INCREMENTAL); + $collection->addFieldToFilter( + ExportInterface::FIELD_STATUS, + ['in' => [ExportInterface::STATUS_PENDING, ExportInterface::STATUS_UPLOADED]] + ); + $collection->addFieldToFilter( + ExportInterface::FIELD_EXPORT_TYPE, + ['in' => [ExportInterface::EXPORT_TYPE_INCREMENTAL, ExportInterface::EXPORT_TYPE_FULL]] + ); /** @var Export[] $exports */ $exports = $collection->getItems(); foreach ($exports as $export) {