diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-12-12 20:24:30 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-12-12 20:24:30 -0500 |
commit | f9ae4f860ccf57e84032d7be9426331a9e06e979 (patch) | |
tree | c9d837d7e2750d22ba9049abc7cf3c4125f0c9e4 /releng | |
parent | 6c5c3355a97d35afb7f1eee284966ad0bf8cee3b (diff) | |
parent | 206000df736fde75a49c3178a8522d17f30a955e (diff) |
Merge tag 'release_2012-04-21'
Migrations, moving code around, random small improvements
Diffstat (limited to 'releng')
-rw-r--r-- | releng/views.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/releng/views.py b/releng/views.py index 007c8c84..33e8fb31 100644 --- a/releng/views.py +++ b/releng/views.py @@ -177,12 +177,18 @@ def submit_test_thanks(request): def iso_overview(request): isos = Iso.objects.all().order_by('-pk') - successes = dict(Iso.objects.values_list('pk').filter(test__success=True).annotate(ct=Count('test'))) - failures = dict(Iso.objects.values_list('pk').filter(test__success=False).annotate(ct=Count('test'))) + successes = dict(Iso.objects.values_list('pk').filter( + test__success=True).annotate(ct=Count('test'))) + failures = dict(Iso.objects.values_list('pk').filter( + test__success=False).annotate(ct=Count('test'))) for iso in isos: iso.successes = successes.get(iso.pk, 0) iso.failures = failures.get(iso.pk, 0) + # only show "useful" rows, currently active ISOs or those with results + isos = [iso for iso in isos if + iso.active == True or iso.successes > 0 or iso.failures > 0] + context = { 'isos': isos } |