views: fix unknown categories comparison stats graph to include "Not available"

Packages with the "Not available" status were inexplicably excluded from
the graph, include them.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
Paul Eggleton 2018-01-10 15:51:32 +13:00
parent ea77e75ddd
commit ea8b656711

View File

@ -1067,7 +1067,7 @@ class ClassicRecipeStatsView(TemplateView):
categories.append(cat) categories.append(cat)
categories.append('none') categories.append('none')
catcounts = dict.fromkeys(categories, 0) catcounts = dict.fromkeys(categories, 0)
unmigrated = recipes.filter(cover_status='U') unmigrated = recipes.filter(cover_status__in=['U', 'N'])
catcounts['none'] = unmigrated.filter(classic_category='').count() catcounts['none'] = unmigrated.filter(classic_category='').count()
values = unmigrated.exclude(classic_category='').values_list('classic_category', flat=True) values = unmigrated.exclude(classic_category='').values_list('classic_category', flat=True)
# We gather data this way because an item might be in more than one category, thus # We gather data this way because an item might be in more than one category, thus