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(