From 5f83679ae93a2f41f8b9c2c57dbc4d16a05ec3b7 Mon Sep 17 00:00:00 2001 From: David McKee Date: Thu, 12 Dec 2024 12:16:47 +0000 Subject: [PATCH] Use save_identifiers on document not identifiers.save() --- ds-caselaw-ingester/lambda_function.py | 2 +- ds-caselaw-ingester/tests.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ds-caselaw-ingester/lambda_function.py b/ds-caselaw-ingester/lambda_function.py index 950b44c..7c9cf9c 100644 --- a/ds-caselaw-ingester/lambda_function.py +++ b/ds-caselaw-ingester/lambda_function.py @@ -456,7 +456,7 @@ def set_document_identifiers(self) -> None: if ncn: doc.identifiers.add(NeutralCitationNumber(ncn)) - doc.identifiers.save(doc) + doc.save_identifiers(doc) logger.info(f"Ingested document had NCN {ncn}") else: logger.info(f"Ingested document had NCN (NOT FOUND)") diff --git a/ds-caselaw-ingester/tests.py b/ds-caselaw-ingester/tests.py index 6c54d9a..93f6abe 100644 --- a/ds-caselaw-ingester/tests.py +++ b/ds-caselaw-ingester/tests.py @@ -215,7 +215,7 @@ def test_handler_messages_s3( ) assert annotation.call_count == 2 assert doc.identifiers.add.call_args_list[0].args[0].value == "[2012] UKUT 82 (IAC)" - doc.identifiers.save.assert_called() + doc.save_identifiers.assert_called() class TestLambda: