diff --git a/tailbone/views/batch/core.py b/tailbone/views/batch/core.py index f29df6e3..402619b2 100644 --- a/tailbone/views/batch/core.py +++ b/tailbone/views/batch/core.py @@ -170,13 +170,14 @@ class BatchMasterView(MasterView): """ breakdown = {} for row in batch.active_rows(): - if row.status_code not in breakdown: - breakdown[row.status_code] = { - 'code': row.status_code, - 'title': row.STATUS[row.status_code], - 'count': 0, - } - breakdown[row.status_code]['count'] += 1 + if row.status_code is not None: + if row.status_code not in breakdown: + breakdown[row.status_code] = { + 'code': row.status_code, + 'title': row.STATUS[row.status_code], + 'count': 0, + } + breakdown[row.status_code]['count'] += 1 breakdown = [ (status['title'], status['count']) for code, status in six.iteritems(breakdown)]