diff --git a/app/celery/tasks.py b/app/celery/tasks.py index a7ca9665c..464e3e1be 100644 --- a/app/celery/tasks.py +++ b/app/celery/tasks.py @@ -321,7 +321,8 @@ def create_dvla_file_contents(job_id): notification.template.__dict__, notification.personalisation, notification_reference=notification.reference, - contact_block=notification.service.letter_contact_block + contact_block=notification.service.letter_contact_block, + org_id=notification.service.dvla_organisation.id, )) for notification in dao_get_all_notifications_for_job(job_id) ) diff --git a/tests/app/celery/test_tasks.py b/tests/app/celery/test_tasks.py index 0a960329b..15d7e571b 100644 --- a/tests/app/celery/test_tasks.py +++ b/tests/app/celery/test_tasks.py @@ -1038,6 +1038,7 @@ def test_create_dvla_file_contents(sample_letter_template, mocker): assert calls[1][1]['contact_block'] == 'London,\nSW1A 1AA' assert calls[0][1]['notification_reference'] == '1' assert calls[1][1]['notification_reference'] == '2' + assert calls[1][1]['org_id'] == '001' @freeze_time("2017-03-23 11:09:00.061258")