Skip to content
New issue

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

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

Already on GitHub? # to your account

Only execute update if document attributes is not empty #862

Merged
merged 2 commits into from
Dec 17, 2018

Conversation

jonbwhite
Copy link
Contributor

Currently if a model has an attribute changed, but that attribute is not part of the elasticsearch template, an empty update will be made to elasticsearch. This change only follows through on the update if there is content in the distilled attributes hash.

@estolfo
Copy link
Contributor

estolfo commented Dec 7, 2018

@jonbwhite Thanks for this pull request. Would you mind adding a test for this scenario Thanks!

@jonbwhite
Copy link
Contributor Author

@estolfo added the test!

@estolfo
Copy link
Contributor

estolfo commented Dec 14, 2018

@jonbwhite The test failures were unrelated to your change, but just to be sure, would you mind rebasing against master so the tests can run in travis with the latest commit to master? Thanks!

@jonbwhite
Copy link
Contributor Author

@estolfo rebased and tests are passing now

@estolfo
Copy link
Contributor

estolfo commented Dec 17, 2018

Thank you @jonbwhite !

@estolfo estolfo merged commit 266b59c into elastic:master Dec 17, 2018
estolfo pushed a commit that referenced this pull request Dec 17, 2018
* Only execute update if document attributes is not empty

* Adds test for skipping empty elasticsearch update
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants