diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/models.py | 3 | ||||
-rw-r--r-- | packages/urls.py | 3 | ||||
-rw-r--r-- | packages/views.py | 6 |
3 files changed, 4 insertions, 8 deletions
diff --git a/packages/models.py b/packages/models.py index 0983c642..faf5f398 100644 --- a/packages/models.py +++ b/packages/models.py @@ -25,8 +25,7 @@ class PackageRelation(models.Model): def get_associated_packages(self): # TODO: delayed import to avoid circular reference from main.models import Package - return Package.objects.filter(pkgbase=self.pkgbase).select_related( - 'arch', 'repo') + return Package.objects.normal().filter(pkgbase=self.pkgbase) def repositories(self): packages = self.get_associated_packages() diff --git a/packages/urls.py b/packages/urls.py index d408e6cf..d7d01170 100644 --- a/packages/urls.py +++ b/packages/urls.py @@ -9,14 +9,13 @@ package_patterns = patterns('packages.views', (r'^flag/done/$', 'flag_confirmed', {}, 'package-flag-confirmed'), (r'^unflag/$', 'unflag'), (r'^unflag/all/$', 'unflag_all'), + (r'^signoff/$', 'signoff_package'), (r'^download/$', 'download'), ) urlpatterns = patterns('packages.views', (r'^flaghelp/$', 'flaghelp'), (r'^signoffs/$', 'signoffs', {}, 'package-signoffs'), - (r'^signoff_package/(?P<arch>[A-z0-9]+)/(?P<pkgname>[A-z0-9\-+.]+)/$', - 'signoff_package'), (r'^update/$', 'update'), (r'^$', 'search', {}, 'packages-search'), diff --git a/packages/views.py b/packages/views.py index 01d01e20..d12583f0 100644 --- a/packages/views.py +++ b/packages/views.py @@ -372,11 +372,9 @@ def signoffs(request): @permission_required('main.change_package') @never_cache -def signoff_package(request, arch, pkgname): +def signoff_package(request, name, repo, arch): pkg = get_object_or_404(Package, - arch__name=arch, - pkgname=pkgname, - repo__testing=True) + pkgname=name, repo__name__iexact=repo, arch__name=arch) signoff, created = Signoff.objects.get_or_create( pkg=pkg, |