Skip to content

Commit

Permalink
Cast Model ID to a string in ProductOptionIndexer.php (#2047)
Browse files Browse the repository at this point in the history
Cast the model's ID property to a string to match other indexers. 

This stops the Typesense scout driver throwing an error when indexing
the record.
  • Loading branch information
mojosef authored Jan 2, 2025
1 parent 0366d02 commit 53605c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/Search/ProductOptionIndexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function makeAllSearchableUsing(Builder $query): Builder

public function toSearchableArray(Model $model): array
{
$data['id'] = $model->id;
$data['id'] = (string) $model->id;

// Loop for add option name
foreach ($model->name as $locale => $name) {
Expand Down

0 comments on commit 53605c6

Please sign in to comment.