Skip to content

Commit

Permalink
Fix error when importing structured collection without mapping parents
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean committed Dec 10, 2024
1 parent 959aa11 commit 89958fe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Jobs/UpdateCollectionTreeJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ public function handle(): void
return;
}

if (! Cache::has("importer.{$this->import->id}.parents")) {
return;
}

$parents = (new SortByParent)->sort(Cache::get("importer.{$this->import->id}.parents"));

collect($parents)->each(function (array $item) use ($tree) {
Expand Down

0 comments on commit 89958fe

Please sign in to comment.