diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-04-26 09:59:34 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-04-26 09:59:34 -0400 |
commit | 5bfa5b7eee551c14ecee616f1830dc4603497311 (patch) | |
tree | 53917036e3a7b515c6c794aa7d1c127d61c15508 /packages/utils.py | |
parent | 9d3cb6e783603d4991f7e610912ba5665fd43260 (diff) | |
parent | 55b776d58999412cd6bf0787a41d6ab00bf80fb6 (diff) |
Merge branch 'archweb-generic2'
Conflicts:
main/fixtures/arches.json
settings.py
templates/public/index.html
templates/public/svn.html
Diffstat (limited to 'packages/utils.py')
-rw-r--r-- | packages/utils.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/utils.py b/packages/utils.py index e77dbace..fade0855 100644 --- a/packages/utils.py +++ b/packages/utils.py @@ -14,7 +14,7 @@ from main.utils import (database_vendor, groupby_preserve_order, PackageStandin) from .models import (PackageGroup, PackageRelation, License, Depend, Conflict, Provision, Replacement, - SignoffSpecification, Signoff, DEFAULT_SIGNOFF_SPEC) + SignoffSpecification, Signoff, fake_signoff_spec) VERSION_RE = re.compile(r'^((\d+):)?(.+)-([^-]+)$') @@ -301,7 +301,6 @@ class PackageSignoffGroup(object): self.user = None self.target_repo = None self.signoffs = set() - self.specification = DEFAULT_SIGNOFF_SPEC self.default_spec = True first = packages[0] @@ -312,6 +311,7 @@ class PackageSignoffGroup(object): self.last_update = first.last_update self.packager = first.packager self.maintainers = first.maintainers + self.specification = fake_signoff_spec(first.arch) version = first.full_version if all(version == pkg.full_version for pkg in packages): @@ -414,7 +414,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): |