Bugfix: Allow empty arrays and objects in json type fields when inserting data into datastore#4826
Merged
wardi merged 3 commits intockan:masterfrom Jun 14, 2019
Icontech:4766-allow-empty-arrays-and-objects-in-json-fields-with-datastore_create
Merged
Bugfix: Allow empty arrays and objects in json type fields when inserting data into datastore#4826wardi merged 3 commits intockan:masterfrom Icontech:4766-allow-empty-arrays-and-objects-in-json-fields-with-datastore_create
wardi merged 3 commits intockan:masterfrom
Icontech:4766-allow-empty-arrays-and-objects-in-json-fields-with-datastore_create
Conversation
…tore_create Currently, adding an empty array or an empty object to a field of type json using datastore_create results in a validation error and status code 409. After this change, empty arrays and empty objects can be added to fields of type json.
…n-fields-with-datastore_create
…n-fields-with-datastore_create
Contributor
Author
|
The test failing is test_calculate_record_count in test_create.py. The response from 'when_was_last_analyze' is None but should be an array with data. |
Contributor
|
@davidread looks like this test was added in 8aa298d any ideas? |
|
Sadly this test is slightly flaky :( I've rerun the tests and they pass this time. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4766
Proposed fixes:
Add bugfix from #1776 to INSERT method in upsert_data. This allows empty json arrays or json objects to be inserted into json type fields when creating new data in the datastore.
Features:
Please [X] all the boxes above that apply