summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2013-01-20 12:43:33 -0600
committerDan McGee <dan@archlinux.org>2013-02-09 16:20:38 -0600
commit271d1babbf8038e17d9dc5cfc3cd659463848400 (patch)
treebd563e669d8cf3cc730b223e366b9d07990e9e42 /main
parent10462425f989dc74653179f0845978a6b5e30045 (diff)
Revert "Reduce query count when retrieving satisfiers and providers"
This reverts commit 20b64e42672d185821cc584dfa4b133ee259a144. Django 1.5 fixed this issue and now parent objects are automatically attached to their children when queries go through the related manager. See "Caching of related model instances" in the release notes. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'main')
-rw-r--r--main/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/models.py b/main/models.py
index 46fd3a63..da9d8b6e 100644
--- a/main/models.py
+++ b/main/models.py
@@ -277,10 +277,10 @@ class Package(models.Model):
# TODO: we can use list comprehension and an 'in' query to make this
# more effective
for dep in self.depends.all():
- pkg = dep.get_best_satisfier(self)
+ pkg = dep.get_best_satisfier()
providers = None
if not pkg:
- providers = dep.get_providers(self)
+ providers = dep.get_providers()
deps.append({'dep': dep, 'pkg': pkg, 'providers': providers})
# sort the list; deptype sorting makes this tricker than expected
sort_order = {'D': 0, 'O': 1, 'M': 2, 'C': 3}