Skip to content

Commit d6e3616

Browse files
committed
Allow retry when some operations have been deleted
1 parent c2a6bf7 commit d6e3616

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Actions/RetryBulkRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ public function retry(BulkRequest $bulkRequest, bool $onlyFailed): ?BulkRequest
2727
foreach ($bulkRequest->request as $index => $request) {
2828

2929
/** @var BulkOperation $operation */
30-
$operation = $operations->where('operation_id', '=', $index)->firstOrFail();
30+
$operation = $operations->where('operation_id', '=', $index)->first();
3131

32-
if ($onlyFailed && ! in_array($operation->status, OperationStatus::failedStatuses())) {
32+
if ($operation === null || ($onlyFailed && ! in_array($operation->status, OperationStatus::failedStatuses()))) {
3333
continue;
3434
}
3535

0 commit comments

Comments
 (0)