From b14d034a78e2245b9759fb570c2b376a89b0be94 Mon Sep 17 00:00:00 2001 From: Arne Binder Date: Tue, 17 Sep 2024 18:03:12 +0200 Subject: [PATCH] fix metadata["original_document"] --- .../taskmodules/common/taskmodule_with_document_converter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pie_modules/taskmodules/common/taskmodule_with_document_converter.py b/src/pie_modules/taskmodules/common/taskmodule_with_document_converter.py index 267b144f9..39c1dfdb2 100644 --- a/src/pie_modules/taskmodules/common/taskmodule_with_document_converter.py +++ b/src/pie_modules/taskmodules/common/taskmodule_with_document_converter.py @@ -65,7 +65,7 @@ def convert_document(self, document: DocumentType) -> ConvertedDocumentType: f"this is not allowed. Please adjust '{type(self).__name__}._convert_document()'" f"to produce documents without that key in metadata." ) - converted_document.metadata["original_document"] = converted_document + converted_document.metadata["original_document"] = document return converted_document def encode(