mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 09:51:11 -05:00
Merge pull request #2292 from alphagov/exclude_cancelled_from_requested
Remove cancelled from requested statuses in service statistics
This commit is contained in:
@@ -84,7 +84,8 @@ def create_zeroed_stats_dicts():
|
|||||||
|
|
||||||
|
|
||||||
def _update_statuses_from_row(update_dict, row):
|
def _update_statuses_from_row(update_dict, row):
|
||||||
update_dict['requested'] += row.count
|
if row.status != 'cancelled':
|
||||||
|
update_dict['requested'] += row.count
|
||||||
if row.status in ('delivered', 'sent'):
|
if row.status in ('delivered', 'sent'):
|
||||||
update_dict['delivered'] += row.count
|
update_dict['delivered'] += row.count
|
||||||
elif row.status in (
|
elif row.status in (
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ NewStatsRow = collections.namedtuple('row', ('notification_type', 'status', 'key
|
|||||||
StatsRow('letter', 'virus-scan-failed', 1),
|
StatsRow('letter', 'virus-scan-failed', 1),
|
||||||
StatsRow('letter', 'permanent-failure', 1),
|
StatsRow('letter', 'permanent-failure', 1),
|
||||||
StatsRow('letter', 'cancelled', 1),
|
StatsRow('letter', 'cancelled', 1),
|
||||||
], [4, 0, 4], [0, 0, 0], [4, 0, 3]),
|
], [4, 0, 4], [0, 0, 0], [3, 0, 3]),
|
||||||
'convert_sent_to_delivered': ([
|
'convert_sent_to_delivered': ([
|
||||||
StatsRow('sms', 'sending', 1),
|
StatsRow('sms', 'sending', 1),
|
||||||
StatsRow('sms', 'delivered', 1),
|
StatsRow('sms', 'delivered', 1),
|
||||||
|
|||||||
Reference in New Issue
Block a user