diff options
author | Dan McGee <dan@archlinux.org> | 2013-04-23 09:29:40 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2013-04-23 09:29:40 -0500 |
commit | ac1c00ee86cc0e355af5e4e6be47ca861091356b (patch) | |
tree | a76b43c56cdc8f21edf6852c26b6c3ed0f1ade4d /packages/utils.py | |
parent | 6fa6a8db0787fa40fa1c88b725b0bce184903c4c (diff) |
When retrieving signoff specs, select the arch object as wellrelease_2013-04-27
Otherwise we do one query per row in the signoff table to fetch the
architecture and it's required_signoffs value, which is less than ideal.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages/utils.py')
-rw-r--r-- | packages/utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/utils.py b/packages/utils.py index b8d1504d..6ec39483 100644 --- a/packages/utils.py +++ b/packages/utils.py @@ -410,7 +410,8 @@ def get_current_signoffs(repos): def get_current_specifications(repos): '''Returns a list of signoff specification objects for the given repos.''' to_fetch = signoffs_id_query(SignoffSpecification, repos) - return SignoffSpecification.objects.in_bulk(to_fetch).values() + return SignoffSpecification.objects.select_related('arch').in_bulk( + to_fetch).values() def get_target_repo_map(repos): |