mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-20 14:29:25 -04:00
Update log message to something a little easier to read and query for.
This commit is contained in:
@@ -123,8 +123,7 @@ def update_validation_failed_for_templated_letter(self, notification_id, page_co
|
|||||||
notification = get_notification_by_id(notification_id, _raise=True)
|
notification = get_notification_by_id(notification_id, _raise=True)
|
||||||
notification.status = NOTIFICATION_VALIDATION_FAILED
|
notification.status = NOTIFICATION_VALIDATION_FAILED
|
||||||
dao_update_notification(notification)
|
dao_update_notification(notification)
|
||||||
current_app.logger.info(f"Letter notification id: {notification_id} reference {notification.reference}: "
|
current_app.logger.info(f"Validation failed: letter is too long {page_count} for letter with id: {notification_id}")
|
||||||
f"validation failed: letter is too long {page_count}")
|
|
||||||
|
|
||||||
|
|
||||||
@notify_celery.task(name='collate-letter-pdfs-to-be-sent')
|
@notify_celery.task(name='collate-letter-pdfs-to-be-sent')
|
||||||
|
|||||||
@@ -190,8 +190,7 @@ def test_update_validation_failed_for_templated_letter_with_too_many_pages(
|
|||||||
assert sample_letter_notification.billable_units == 0
|
assert sample_letter_notification.billable_units == 0
|
||||||
assert sample_letter_notification.status == NOTIFICATION_VALIDATION_FAILED
|
assert sample_letter_notification.status == NOTIFICATION_VALIDATION_FAILED
|
||||||
mock_logger.assert_called_once_with(
|
mock_logger.assert_called_once_with(
|
||||||
f"Letter notification id: {sample_letter_notification.id} reference {sample_letter_notification.reference}: "
|
f"Validation failed: letter is too long 11 for letter with id: {sample_letter_notification.id}"
|
||||||
f"validation failed: letter is too long 11"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user