Fix serialisation error when creating the create_letters_pdf in resend_created_notifications_older_than

This commit is contained in:
Rebecca Law
2020-03-17 08:48:02 +00:00
parent fa72eb651f
commit 51f43563d3
2 changed files with 3 additions and 3 deletions

View File

@@ -205,7 +205,7 @@ def replay_created_notifications():
current_app.logger.info(msg)
for letter in letters:
create_letters_pdf.apply_async([letter.id], queue=QueueNames.LETTERS)
create_letters_pdf.apply_async([str(letter.id)], queue=QueueNames.LETTERS)
@notify_celery.task(name='check-precompiled-letter-state')

View File

@@ -329,8 +329,8 @@ def test_replay_created_notifications_create_letters_pdf_tasks_for_letters_not_r
replay_created_notifications()
calls = [call([notification_1.id], queue=QueueNames.LETTERS),
call([notification_2.id], queue=QueueNames.LETTERS),
calls = [call([str(notification_1.id)], queue=QueueNames.LETTERS),
call([str(notification_2.id)], queue=QueueNames.LETTERS),
]
mock_task.assert_has_calls(calls, any_order=True)