diff --git a/app/service/statistics.py b/app/service/statistics.py index d942ad427..37de941e5 100644 --- a/app/service/statistics.py +++ b/app/service/statistics.py @@ -89,7 +89,7 @@ def _update_statuses_from_row(update_dict, row): update_dict['delivered'] += row.count elif row.status in ( 'failed', 'technical-failure', 'temporary-failure', - 'permanent-failure', 'validation-failed', 'virus-scan-failed', 'cancelled'): + 'permanent-failure', 'validation-failed', 'virus-scan-failed'): update_dict['failed'] += row.count diff --git a/tests/app/service/test_statistics.py b/tests/app/service/test_statistics.py index d553b90f2..0e55d67dd 100644 --- a/tests/app/service/test_statistics.py +++ b/tests/app/service/test_statistics.py @@ -39,7 +39,7 @@ NewStatsRow = collections.namedtuple('row', ('notification_type', 'status', 'key StatsRow('letter', 'virus-scan-failed', 1), StatsRow('letter', 'permanent-failure', 1), StatsRow('letter', 'cancelled', 1), - ], [4, 0, 4], [0, 0, 0], [4, 0, 4]), + ], [4, 0, 4], [0, 0, 0], [4, 0, 3]), 'convert_sent_to_delivered': ([ StatsRow('sms', 'sending', 1), StatsRow('sms', 'delivered', 1),