Skip to content

Commit

Permalink
Guard against headers being None
Browse files Browse the repository at this point in the history
  • Loading branch information
jayvarner committed Nov 25, 2024
1 parent 4e9f395 commit ff8acd7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions readux_ingest_ecds/services/metadata_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
2 changes: 1 addition & 1 deletion test_app/tests/test_ocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (<string>, line 1)\n"
f"Canvas {canvas.pid} - XMLSyntaxError: Document is empty, line 1, column 1 (<string>, line 1)$$$$"
)
assert "XMLSyntaxError" in mail.outbox[0].body

0 comments on commit ff8acd7

Please sign in to comment.