summaryrefslogtreecommitdiffstats
path: root/packages/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/utils.py')
-rw-r--r--packages/utils.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/packages/utils.py b/packages/utils.py
index 0d756a8..4af0f67 100644
--- a/packages/utils.py
+++ b/packages/utils.py
@@ -156,6 +156,7 @@ def attach_maintainers(packages):
'''Given a queryset or something resembling it of package objects, find all
the maintainers and attach them to the packages to prevent N+1 query
cascading.'''
+ packages = list(packages)
pkgbases = set(p.pkgbase for p in packages)
rels = PackageRelation.objects.filter(type=PackageRelation.MAINTAINER,
pkgbase__in=pkgbases).values_list('pkgbase', 'user_id').distinct()