From 244c9b96a2dbafda7751de3f6d8c67515fc08ca6 Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Sun, 6 Apr 2025 16:02:30 +0530 Subject: [PATCH] (fix:attach) pass attachment docs as it is --- application/api/answer/routes.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/application/api/answer/routes.py b/application/api/answer/routes.py index 7f61880d..97fce28c 100644 --- a/application/api/answer/routes.py +++ b/application/api/answer/routes.py @@ -831,12 +831,7 @@ def get_attachments_content(attachment_ids, user): }) if attachment_doc: - attachments.append({ - "id": str(attachment_doc["_id"]), - "content": attachment_doc["content"], - "token_count": attachment_doc.get("token_count", 0), - "path": attachment_doc.get("path", "") - }) + attachments.append(attachment_doc) except Exception as e: logger.error(f"Error retrieving attachment {attachment_id}: {e}")