Fix wrong get_check_exists sample. No exception handling is required anymore #2429
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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