Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update firestore.py
  • Loading branch information
KarenjanM authored Oct 4, 2023
commit 168cd759026f3dce8607a32978d42a537af0006e
3 changes: 2 additions & 1 deletion firebase_admin/firestore.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ def from_app(cls, app):
"""Creates a new _FirestoreClient for the specified app."""
credentials = app.credential.get_credential()
project = app.project_id
database_id = app.options.get('database_id')
if not project:
raise ValueError(
'Project ID is required to access Firestore. Either set the projectId option, '
'or use service account credentials. Alternatively, set the GOOGLE_CLOUD_PROJECT '
'environment variable.')
return _FirestoreClient(credentials, project)
return _FirestoreClient(credentials, project, database_id)