Made it so the save_to_db also returns the ID of the document
This commit is contained in:
@@ -54,9 +54,9 @@ def save_to_db(collection: str, item):
|
||||
document_ref = collection_ref.add(item)
|
||||
if document_ref:
|
||||
print(f"Document added with ID: {document_ref}")
|
||||
return True
|
||||
return (True, document_ref)
|
||||
else:
|
||||
return False
|
||||
return (False, None)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user