Skip to content
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

ndb.Expando properties load and save #117

Merged

Conversation

alexrwix
Copy link
Contributor

We are porting our py27 GAE project to py37 GAE and replacing built-in services to their gcloud library counterparts.

During writing exploration tests for python-ndb we found that Expando models properties are not loaded from datastore for existing models and also not saved for new ones.
Also in the case of repeated properties that contains None values, _BaseValue(value) raising an exception.

After investigation, we made some changes in _entity_from_ds_entity and _entity_to_ds_entity functions and currently expando properties loads and saves as expected.

Please review.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 23, 2019
Copy link
Contributor

@cguardia cguardia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Thank you so much for the contribution. Just had a question below, but I think this is almost ready to merge.

src/google/cloud/ndb/model.py Outdated Show resolved Hide resolved
@cguardia cguardia merged commit d213206 into googleapis:master Jun 24, 2019
@cguardia
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants