Permalink
Browse files

* fix spam distribution graph

  • Loading branch information...
1 parent 7dda1bc commit c377e96dc0ee51ad79561f6e79b5e553475b2d19 @akissa akissa committed Oct 28, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/baruwa/reports/views.py
@@ -300,8 +300,9 @@ def report(request, report_kind):
get_active_filters(filter_list, active_filters)
data = SpamScores.objects.all(request.user, filter_list, addrs, act)
- for row in data:
- scores.append({'value': int(row.score), 'text': str(row.score)})
+ for index, row in enumerate(data):
+ value = index + 1
+ scores.append({'value': value, 'text': str(row.score)})
counts.append({'y': int(row.count),
'tooltip': 'Score ' + str(row.score) + ': ' + str(row.count)})

0 comments on commit c377e96

Please sign in to comment.