diff --git a/CHANGELOG.md b/CHANGELOG.md index c78b23b..c5e73f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/) ## [Unreleased] +## [7.6.2] - 2024-06-24 +### Fixed +- [Change if conditions order in soft deletes check for compatibility](https://github.com/matchish/laravel-scout-elasticsearch/pull/282). + ## [7.6.1] - 2024-05-14 ### Fixed - fix for [parser incompatibility](https://github.com/matchish/laravel-scout-elasticsearch/issues/273) diff --git a/src/ElasticSearch/Params/Bulk.php b/src/ElasticSearch/Params/Bulk.php index 475ece0..8d4c562 100644 --- a/src/ElasticSearch/Params/Bulk.php +++ b/src/ElasticSearch/Params/Bulk.php @@ -41,7 +41,7 @@ public function toArray(): array $payload = ['body' => []]; $payload = collect($this->indexDocs)->reduce( function ($payload, $model) { - if ($model::usesSoftDelete() && config('scout.soft_delete', false)) { + if (config('scout.soft_delete', false) && $model::usesSoftDelete()) { $model->pushSoftDeleteMetadata(); }