Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.0] Fix empty update with soft delete #370

Merged
merged 2 commits into from
Apr 1, 2019
Merged

[7.0] Fix empty update with soft delete #370

merged 2 commits into from
Apr 1, 2019

Conversation

driesvints
Copy link
Member

When skipping records during updates on Algolia items, we should ignore any metadata as this shouldn't be a factor on wether to index or not. Only records which have at least one key value pair for indexing should be indexed.

This fixes a bug where empty records with soft deleted enabled were still being updated. Fixes #350

This refactor allows us to pass in the value of the soft delete setting with the constructor of the engine instead of a function call in the class itself. This allows us to more easily test the behavior of the engine.
When skipping records during updates on Algolia items, we should ignore any metadata as this shouldn't be a factor on wether to index or not. Only records which have at least one key value pair for indexing should be indexed.

This fixes a bug where empty records with soft deleted enabled were still being updated: #350
@driesvints
Copy link
Member Author

This will probably conflict with the other pr because I refactored the test suite. I'll rebase this once the other one is merged.

@taylorotwell taylorotwell merged commit 7c9e07f into laravel:7.0 Apr 1, 2019
@driesvints driesvints deleted the fix-empty-update-with-soft-delete branch April 1, 2019 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't skip empty updates using soft deletes
2 participants