From d4155f7d0fcec64f45f713e5bfdd33db990023b0 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 3 Mar 2010 21:07:26 -0600 Subject: Use repo.testing flag instead of test-based checks Signed-off-by: Dan McGee --- packages/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'packages') diff --git a/packages/views.py b/packages/views.py index 8a2b4ec..6bd54a6 100644 --- a/packages/views.py +++ b/packages/views.py @@ -198,11 +198,11 @@ def unflag(request, pkgid): @permission_required('main.change_package') def signoffs(request): - packages = Package.objects.select_related('arch', 'repo', 'signoffs').filter(repo__name__endswith="Testing").order_by("pkgname") + packages = Package.objects.select_related('arch', 'repo', 'signoffs').filter(repo__testing=True).order_by("pkgname") package_list = [] - q_pkgname = Package.objects.filter(repo__name__endswith="Testing").values('pkgname').distinct().query - package_repos = Package.objects.values('pkgname', 'repo__name').exclude(repo__name__endswith="Testing").filter(pkgname__in=q_pkgname) + q_pkgname = Package.objects.filter(repo__testing=True).values('pkgname').distinct().query + package_repos = Package.objects.values('pkgname', 'repo__name').exclude(repo__testing=True).filter(pkgname__in=q_pkgname) pkgtorepo = dict() for pr in package_repos: pkgtorepo[pr['pkgname']] = pr['repo__name'] @@ -221,7 +221,7 @@ def signoff_package(request, arch, pkgname): pkg = get_object_or_404(Package, arch__name=arch, pkgname=pkgname, - repo__name="Testing") + repo__testing=True) signoff, created = Signoff.objects.get_or_create( pkg=pkg, -- cgit v1.2.3-24-g4f1b