Skip to content

Commit 587eae1

Browse files
committed
don’t try and opt in without an id
1 parent 6ff1ba0 commit 587eae1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/UseCases/PushStaleToCyclopsUseCase.php

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ public function execute(CyclopsCustomerListEntity $list, callable $onItemPushed)
2222
{
2323
foreach ($list->items as $item) {
2424
try {
25+
if (!$item->identity->id) {
26+
throw new CustomerNotFoundException();
27+
}
2528
$this->cyclopsService->setBrandOptInStatus($item);
2629
$onItemPushed($item, false);
2730
} catch (CustomerNotFoundException $exception) {

0 commit comments

Comments
 (0)