Skip to content

Commit

Permalink
fix: deep copy of documents!
Browse files Browse the repository at this point in the history
  • Loading branch information
amindadgar committed Nov 27, 2024
1 parent 828158c commit 3e8f740
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dags/hivemind_etl_helpers/src/db/gdrive/gdrive_loader.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import copy
import logging
import os
from typing import List, Optional
Expand Down Expand Up @@ -116,7 +117,7 @@ def _transform_google_documents(self, documents: list[Document]) -> list[Documen
transform google extracted documents by inserting their metadata a url
"""
# copying
transformed_docs: list[Document] = list(documents)
transformed_docs: list[Document] = copy.deepcopy(documents)

for doc in transformed_docs:
file_id: str | None = doc.metadata.get("file id")
Expand Down

0 comments on commit 3e8f740

Please sign in to comment.