diff --git a/readux_ingest_ecds/services/metadata_services.py b/readux_ingest_ecds/services/metadata_services.py index 9c9c775..3eea913 100644 --- a/readux_ingest_ecds/services/metadata_services.py +++ b/readux_ingest_ecds/services/metadata_services.py @@ -29,6 +29,7 @@ def clean_metadata(metadata): else key ): value for key, value in metadata.items() + if key is not None } if "metadata" not in metadata.keys(): diff --git a/test_app/tests/test_ocr.py b/test_app/tests/test_ocr.py index dc951d1..8bb526a 100644 --- a/test_app/tests/test_ocr.py +++ b/test_app/tests/test_ocr.py @@ -38,6 +38,6 @@ def test_empty_xml(self): local.refresh_from_db() local.success() assert local.warnings.startswith( - f"Canvas {canvas.pid} - XMLSyntaxError: Document is empty, line 1, column 1 (, line 1)\n" + f"Canvas {canvas.pid} - XMLSyntaxError: Document is empty, line 1, column 1 (, line 1)$$$$" ) assert "XMLSyntaxError" in mail.outbox[0].body