-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Properly handling entity meanings in datastore. #1241
Conversation
@tseaver I think this spells the end of inheriting from |
meaning, orig_value = entity._meanings[name] | ||
# Only add the meaning back to the protobuf if the value is | ||
# unchanged from when it was originally read from the API. | ||
if orig_value is value: |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@tseaver Bump |
aa7e011
to
20c1aed
Compare
@tseaver It is now merge-able |
""" | ||
meaning = None | ||
if is_list: | ||
all_meaning = True |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
To do this, added entity_to_protobuf method that could be used recursively. Also solves googleapis#1206 since recursively serializing nested entities to protobuf was being done incorrectly. Fixes googleapis#1065. Fixes googleapis#1206.
20c1aed
to
5873266
Compare
@tseaver PTAL, I went with the simpler version of |
LGTM |
Properly handling entity meanings in datastore.
…/python-docs-samples#1241) Protobuf handles the base64 encoding for you, and so the content was being base64 encoded twice.
To do this, added
entity_to_protobuf
method that could be used recursively. Also solves #1206 since recursively serializing nested entities to protobuf was being done incorrectly.Fixes #1065. Fixes #1206.