Only show arches/repos that are necessary

After the refactor in commit 7947d36c4, we weren't gathering arches and
repos from the correct list of packages. Fix this.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2014-10-18 10:25:10 -05:00
parent 91a36e65a3
commit d088579eba

View File

@ -197,6 +197,7 @@ def report(request, report_name, username=None):
maints = User.objects.filter(id__in=PackageRelation.objects.filter(
type=PackageRelation.MAINTAINER).values('user'))
packages = report.packages(packages, username)
arches = {pkg.arch for pkg in packages}
repos = {pkg.repo for pkg in packages}
context = {
@ -204,7 +205,7 @@ def report(request, report_name, username=None):
'title': report.description,
'report': report,
'maintainer': user,
'packages': report.packages(packages, username),
'packages': packages,
'arches': sorted(arches),
'repos': sorted(repos),
'column_names': report.names,