Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -212,10 +212,7 @@ def extract_text_from_file(
|
|
| 212 |
existing_document = invoice_collection.find_one({"entityrefkey": entity_ref_key})
|
| 213 |
if existing_document:
|
| 214 |
existing_document["_id"] = str(existing_document["_id"])
|
| 215 |
-
return
|
| 216 |
-
"message": "Document Retrieved from MongoDB.",
|
| 217 |
-
"document": existing_document
|
| 218 |
-
}
|
| 219 |
|
| 220 |
# Fetch JSON schema for the document type
|
| 221 |
schema_doc = schema_collection.find_one({"document_type": document_type})
|
|
|
|
| 212 |
existing_document = invoice_collection.find_one({"entityrefkey": entity_ref_key})
|
| 213 |
if existing_document:
|
| 214 |
existing_document["_id"] = str(existing_document["_id"])
|
| 215 |
+
return existing_document
|
|
|
|
|
|
|
|
|
|
| 216 |
|
| 217 |
# Fetch JSON schema for the document type
|
| 218 |
schema_doc = schema_collection.find_one({"document_type": document_type})
|