Revert "Made it so the save_to_db also returns the ID of the document"
This reverts commit 4a0ae88fed.
This commit is contained in:
@@ -51,10 +51,10 @@ def upload_file_firebase_get_url(bucket_name, destination_blob_name, source_file
|
||||
def save_to_db(collection: str, item):
|
||||
db = firestore.client()
|
||||
collection_ref = db.collection(collection)
|
||||
document_ref = collection_ref.add(item)
|
||||
(update_time, document_ref) = collection_ref.add(item)
|
||||
if document_ref:
|
||||
print(f"Document added with ID: {document_ref}")
|
||||
return (True, document_ref)
|
||||
print(f"Document added with ID: {document_ref.id}")
|
||||
return (True, document_ref.id)
|
||||
else:
|
||||
return (False, None)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user