diff --git a/CHANGELOG.md b/CHANGELOG.md index d27891f..a37107f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ # Changelog -[Unreleased changes](https://github.com/justbetter/laravel-magento-async/compare/1.2.0...main) +[Unreleased changes](https://github.com/justbetter/laravel-magento-async/compare/1.2.1...main) +## [1.2.1](https://github.com/justbetter/laravel-magento-async/releases/tag/1.2.1) - 2025-10-17 + +### What's Changed +* Adjust workflows by @VincentBean in https://github.com/justbetter/laravel-magento-async/pull/6 +* Add indexes by @VincentBean in https://github.com/justbetter/laravel-magento-async/pull/7 + + +**Full Changelog**: https://github.com/justbetter/laravel-magento-async/compare/1.2.0...1.2.1 + ## [1.2.0](https://github.com/justbetter/laravel-magento-async/releases/tag/1.2.0) - 2025-02-13 ### What's Changed diff --git a/src/Actions/RetryBulkRequest.php b/src/Actions/RetryBulkRequest.php index 4e0e493..4fe0978 100644 --- a/src/Actions/RetryBulkRequest.php +++ b/src/Actions/RetryBulkRequest.php @@ -26,10 +26,10 @@ public function retry(BulkRequest $bulkRequest, bool $onlyFailed): ?BulkRequest foreach ($bulkRequest->request as $index => $request) { - /** @var BulkOperation $operation */ - $operation = $operations->where('operation_id', '=', $index)->firstOrFail(); + /** @var ?BulkOperation $operation */ + $operation = $operations->where('operation_id', '=', $index)->first(); - if ($onlyFailed && ! in_array($operation->status, OperationStatus::failedStatuses())) { + if ($operation === null || ($onlyFailed && ! in_array($operation->status, OperationStatus::failedStatuses()))) { continue; }