summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-03-03 21:07:26 -0600
committerDan McGee <dan@archlinux.org>2010-03-06 15:37:02 -0600
commitd4155f7d0fcec64f45f713e5bfdd33db990023b0 (patch)
tree1cd1248a8ad7ee2425eb6b806b41880558bc6cbd /packages
parent96b4c52f6d536e5fc21389b65528f2b116aa74ca (diff)
Use repo.testing flag instead of test-based checks
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages')
-rw-r--r--packages/views.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/views.py b/packages/views.py
index 8a2b4ec3..6bd54a66 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,