| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…d of `string_value`
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Sorry, something went wrong.
|
Hi @asthamohta, There is a bug in _make_value_pb function. My fix is: def _make_value_pb(value):
...
if isinstance(value, JsonObject):
value = value.serialize()
if value is None:
return Value(null_value="NULL_VALUE")
else:
return Value(string_value=value)
Could you please check it and approve the PR? |
Sorry, something went wrong.
|
Should be okay. There is an if statement upper in the method, which does the same for all the data types, but JsonObject is more complicated than other types, so it passes the condition (and we can't change this behavior for the class, because there is no magic method for is None statements). A test should be added though. @o-aleks, will you find time to add a test? Or I can do it in a separate issue. |
Sorry, something went wrong.
|
Sorry, something went wrong.
|
Thanks, @o-aleks, looks good, and tests are passing fine. I'm merging it. |
Sorry, something went wrong.
🤖 I have created a release *beep* *boop* --- ## [3.20.0](v3.19.0...v3.20.0) (2022-08-30) ### Features * Adds TypeAnnotationCode PG_JSONB ([#792](#792)) ([6a661d4](6a661d4)) ### Bug Fixes * if JsonObject serialized to None then return `null_value` instead of `string_value` ([#771](#771)) ([82170b5](82170b5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- ## [3.20.0](googleapis/python-spanner@v3.19.0...v3.20.0) (2022-08-30) ### Features * Adds TypeAnnotationCode PG_JSONB ([#792](googleapis/python-spanner#792)) ([6a661d4](googleapis/python-spanner@6a661d4)) ### Bug Fixes * if JsonObject serialized to None then return `null_value` instead of `string_value` ([#771](googleapis/python-spanner#771)) ([82170b5](googleapis/python-spanner@82170b5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
| Back | FazBrowse Home | New Git URL |
No description provided.