Skip to content

Fix wrong get_check_exists sample. No exception handling is required anymore #2429

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

Merged
merged 2 commits into from
Oct 3, 2019

Conversation

limexp
Copy link
Contributor

@limexp limexp commented Oct 1, 2019

PR as requested in #2261 (comment)

There are no more exceptions when no document found in DocumentReference.get() call.

If the document does not exist at the time of the snapshot is taken, the snapshot’s reference, data, update_time, and create_time attributes will all be None and its exists attribute will be False.

https://googleapis.github.io/google-cloud-python/latest/firestore/document.html#google.cloud.firestore_v1.document.DocumentReference.get

Now issues googleapis/google-cloud-python#4530 and googleapis/google-cloud-python#4531 are resolved

There are no more exceptions when no document found in DocumentReference.get() call.

If the document does not exist at the time of the snapshot is taken, the snapshot’s reference, data, update_time, and create_time attributes will all be None and its exists attribute will be False.

https://googleapis.github.io/google-cloud-python/latest/firestore/document.html#google.cloud.firestore_v1.document.DocumentReference.get

Now issues googleapis/google-cloud-python#4530 and googleapis/google-cloud-python#4531 are resolved
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 1, 2019
@andrewferlitsch andrewferlitsch merged commit e474a32 into GoogleCloudPlatform:master Oct 3, 2019
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