revert platform admin statistics

was erroneously using 'requested' rather than calculating 'sending'
This commit is contained in:
Leo Hemsted
2016-11-15 11:12:19 +00:00
parent 6a9973d1b6
commit 5edb8cd086
3 changed files with 18 additions and 10 deletions

View File

@@ -64,7 +64,14 @@ def format_stats_by_service(services):
yield {
'id': service['id'],
'name': service['name'],
'stats': service['statistics'],
'stats': {
msg_type: {
'sending': stats['requested'] - stats['delivered'] - stats['failed'],
'delivered': stats['delivered'],
'failed': stats['failed'],
}
for msg_type, stats in service['statistics'].items()
},
'restricted': service['restricted'],
'research_mode': service['research_mode'],
'created_at': service['created_at']