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

Firestore: Non-existing Documents #4809

Closed
schmidt-sebastian opened this issue Jan 29, 2018 · 2 comments · Fixed by #5007
Closed

Firestore: Non-existing Documents #4809

schmidt-sebastian opened this issue Jan 29, 2018 · 2 comments · Fixed by #5007
Assignees
Labels
api: firestore Issues related to the Firestore API. type: process A process-related concern. May include testing, release, or the like.

Comments

@schmidt-sebastian
Copy link

Calls to DocumentSnapshot.to_dict() for non-existing documents should return None and not an empty dictionary.

@chemelnucfin chemelnucfin self-assigned this Jan 31, 2018
@chemelnucfin chemelnucfin added api: firestore Issues related to the Firestore API. type: process A process-related concern. May include testing, release, or the like. labels Jan 31, 2018
@chemelnucfin
Copy link
Contributor

Hi Sebastian,
The DocumentSnapshot should have already raised an exception on creation if the document is not found. So I believe that returning None would be extraneous. Please let me know if you don't think that's the case.

@schmidt-sebastian
Copy link
Author

schmidt-sebastian commented Feb 3, 2018

We should no longer raise exceptions for missing documents, but instead return None/Null for any getData() call. Clients should still be able to access metadata such as readTime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the Firestore API. type: process A process-related concern. May include testing, release, or the like.
Projects
None yet
2 participants