diff options
author | eliott <eliott@cactuswax.net> | 2008-04-05 22:27:10 +0200 |
---|---|---|
committer | eliott <eliott@cactuswax.net> | 2008-04-05 22:27:10 +0200 |
commit | 5f48dda94b593feefd906a7aa495427c870d6db9 (patch) | |
tree | 4d3fcd300f9e747b77ae41922ec943f1e9939faa /main | |
parent | 1bac739c5cbf13163072d6929c43f686c4a828c9 (diff) | |
download | archweb-5f48dda94b593feefd906a7aa495427c870d6db9.tar.gz archweb-5f48dda94b593feefd906a7aa495427c870d6db9.tar.xz |
Fix for FS#9554
Backported and modified from 'master'
Diffstat (limited to 'main')
-rw-r--r-- | main/models.py | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/main/models.py b/main/models.py index 74f2cdb..525a4ce 100644 --- a/main/models.py +++ b/main/models.py @@ -70,14 +70,22 @@ class PackageManager(models.Manager): def get_flag_stats(self): results = [] # first the orphans - unflagged = self.filter(maintainer=0).count() - flagged = self.filter(maintainer=0).filter(needupdate=True).count() - results.append((User(id=0,first_name='Orphans'), unflagged, flagged)) + noflag = self.filter(maintainer=0).count() + flagged = self.filter(maintainer=0).filter(needupdate=True).count() + flagnotest = self.filter(maintainer=0).filter( + needupdate=True).exclude( + repo=Package.REPOS['testing']).count() + results.append( + (User(id=0,first_name='Orphans'), noflag, flagged, flagnotest)) # now the rest for maint in User.objects.all().order_by('first_name'): - unflagged = self.filter(maintainer=maint.id).count() - flagged = self.filter(maintainer=maint.id).filter(needupdate=True).count() - results.append((maint, unflagged, flagged)) + noflag = self.filter(maintainer=maint.id).count() + flagged = self.filter(maintainer=maint.id).filter( + needupdate=True).count() + flagnotest = self.filter(maintainer=maint.id).filter( + needupdate=True).exclude( + repo=Package.REPOS['testing']).count() + results.append((maint, noflag, flagged, flagnotest)) return results |