Title: Datastore: empty lists are not reflected in 'client.put' · Issue #6284 · googleapis/google-cloud-python · GitHub
Open Graph Title: Datastore: empty lists are not reflected in 'client.put' · Issue #6284 · googleapis/google-cloud-python
X Title: Datastore: empty lists are not reflected in 'client.put' · Issue #6284 · googleapis/google-cloud-python
Description: Related to #3767 Currently, Sending an empty array results in the field not being set. from google.cloud import datastore ds = datastore.Client() key = ds.key('Test') entity = datastore.Entity(key=key) entity['children'] = [] ds.put(enti...
Open Graph Description: Related to #3767 Currently, Sending an empty array results in the field not being set. from google.cloud import datastore ds = datastore.Client() key = ds.key('Test') entity = datastore.Entity(key=...
X Description: Related to #3767 Currently, Sending an empty array results in the field not being set. from google.cloud import datastore ds = datastore.Client() key = ds.key('Test') entity = datastore.Ent...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/6284
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Datastore: empty lists are not reflected in 'client.put'","articleBody":"Related to https://github.com/googleapis/google-cloud-python/pull/3767\r\n\r\nCurrently, Sending an empty array results in the field not being set.\r\n\r\n```python\r\nfrom google.cloud import datastore\r\n\r\nds = datastore.Client()\r\n\r\nkey = ds.key('Test')\r\nentity = datastore.Entity(key=key)\r\nentity['children'] = []\r\nds.put(entity)\r\nprint(entity)\r\nvalue = ds.get(entity.key)\r\nprint(value)\r\n\r\nkey = ds.key('Test')\r\nentity = datastore.Entity(key=key)\r\nentity['children'] = ['A']\r\nds.put(entity)\r\nprint(entity)\r\nvalue = ds.get(entity.key)\r\nprint(value)\r\n```\r\n\r\nOutput:\r\n\r\n```\r\n\u003cEntity('Test', 5707090131681280) {'children': []}\u003e\r\n\u003cEntity('Test', 5707090131681280) {}\u003e\r\n\u003cEntity('Test', 5682274280407040) {'children': ['A']}\u003e\r\n\u003cEntity('Test', 5682274280407040) {'children': ['A']}\u003e\r\n```","author":{"url":"https://github.com/crwilcox","@type":"Person","name":"crwilcox"},"datePublished":"2018-10-22T20:40:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/6284/google-cloud-python/issues/6284"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1887f59d-31ba-dd9a-8270-ffefeff24648 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E850:4F8A:1F86466:2B1A72B:6A4F246B |
| html-safe-nonce | 839d92eefe88024f6901ef098bf20c06d4e62dd3541487e678784b3cd26a2534 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODUwOjRGOEE6MUY4NjQ2NjoyQjFBNzJCOjZBNEYyNDZCIiwidmlzaXRvcl9pZCI6IjY0MDAwODYwNDEyMTA4NTY1NTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9eff691aa029d17f76612eb4b92b9ce01f021bf27d1071b7f05ec635484bd341 |
| hovercard-subject-tag | issue:372690194 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-python/6284/issue_layout |
| twitter:image | https://opengraph.githubassets.com/05a6434b06184b04dfaa2f5ca8580490f73e7d88ddc2ca9b790bc484c0854c8f/googleapis/google-cloud-python/issues/6284 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/05a6434b06184b04dfaa2f5ca8580490f73e7d88ddc2ca9b790bc484c0854c8f/googleapis/google-cloud-python/issues/6284 |
| og:image:alt | Related to #3767 Currently, Sending an empty array results in the field not being set. from google.cloud import datastore ds = datastore.Client() key = ds.key('Test') entity = datastore.Entity(key=... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | crwilcox |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 16316451 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16316451 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b8f23afb982271f1b22258a94aede67a6b77760 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width