Skip to content

Commit

Permalink
Merge pull request #78 from typesense/bugfix/soft_deletes
Browse files Browse the repository at this point in the history
Bugfix impoert soft_delete record when scout.soft_delete is true
  • Loading branch information
arayiksmbatyan committed Sep 1, 2023
2 parents b39dcfa + 8e40670 commit b8fdc98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Engines/TypesenseEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public function update($models): void
$models->each->pushSoftDeleteMetadata();
}

if (!$this->usesSoftDelete($models->first()) || is_null($models->first()?->deleted_at)) {
if (!$this->usesSoftDelete($models->first()) || is_null($models->first()?->deleted_at) || config('scout.soft_delete', false)) {
$this->typesense->importDocuments($collection, $models->map(fn($m) => $m->toSearchableArray())
->toArray());
}
Expand Down

0 comments on commit b8fdc98

Please sign in to comment.