summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-10-04 17:37:39 -0500
committerDan McGee <dan@archlinux.org>2010-10-04 17:37:39 -0500
commit11f0db759bb04d0dce303de91c6df441cdf0bfee (patch)
treeb7f76309cba6ef20587040672be5ed6684d6bdc4 /packages
parent0e58a2e49f59fe41a27afa7bf8f9b3c77405c6d1 (diff)
Add some select_related() magic
Made obvious when poking around with the Django debug toolbar. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages')
-rw-r--r--packages/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/utils.py b/packages/utils.py
index 55b7acf9..93d0de79 100644
--- a/packages/utils.py
+++ b/packages/utils.py
@@ -104,7 +104,7 @@ SELECT p.id, q.id
# column A will always have a value, column B might be NULL
to_fetch.append(row[0])
# fetch all of the necessary packages
- pkgs = Package.objects.in_bulk(to_fetch)
+ pkgs = Package.objects.select_related('arch', 'repo').in_bulk(to_fetch)
# now build a list of tuples containing differences
differences = []
for row in results: