Skip to content

Commit 8f6f564

Browse files
committed
fix: missing mongodb_client param in normalise_notice()
This is required for passing the mongodb client to the MappingFilesRegistry, which picks up mapping metadata resource files from the MS config. Without this there is a mismatch in the mongodb client in tests, whose first entrypoint usually gets a mock, but in this case, the normalisation would've defaulted to a real one retrieved from the environment.
1 parent fc647dd commit 8f6f564

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/dags/pipelines/notice_processor_pipelines.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def notice_normalisation_pipeline(notice: Notice, mongodb_client: MongoClient =
1818
try:
1919
notice.update_status_to(new_status=NoticeStatus.RAW)
2020
indexed_notice = index_notice(notice=notice)
21-
normalised_notice = normalise_notice(notice=indexed_notice)
21+
normalised_notice = normalise_notice(notice=indexed_notice, mongodb_client=mongodb_client)
2222
except Exception as e:
2323
log_notice_error(message=str(e), notice_id=notice.ted_id, domain_action=notice_normalisation_pipeline.__name__)
2424
return NoticePipelineOutput(notice=notice, processed=False, store_result=False)

0 commit comments

Comments
 (0)