Skip to content

Commit

Permalink
Merge pull request #282 from rafaucau/soft_delete_condition
Browse files Browse the repository at this point in the history
Change if conditions order in soft deletes check for compatibility
  • Loading branch information
matchish authored Jun 24, 2024
2 parents 3a05178 + 666addd commit 94365ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/ElasticSearch/Params/Bulk.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 94365ad

Please sign in to comment.