kmuthudurai commited on
Commit
467cb4b
·
verified ·
1 Parent(s): 4ed7c26

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
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})