diff options
author | Dan McGee <dan@archlinux.org> | 2013-01-09 08:02:19 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2013-01-12 15:51:51 -0600 |
commit | 255a992c151b1c9386c3450083144447be2ce27a (patch) | |
tree | d3d6709a90f8a1bf4473a7fbd918e15864aed18d /packages/models.py | |
parent | ec2ab9ba35e83dce20789b48f52f3aec02d788fc (diff) |
Add get_associated_packages method to FlagRequest
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'packages/models.py')
-rw-r--r-- | packages/models.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/models.py b/packages/models.py index 18d57c58..ef86d8e9 100644 --- a/packages/models.py +++ b/packages/models.py @@ -206,6 +206,13 @@ class FlagRequest(models.Model): return u'%d:%s-%s' % (self.epoch, self.pkgver, self.pkgrel) return u'%s-%s' % (self.pkgver, self.pkgrel) + def get_associated_packages(self): + return Package.objects.normal().filter( + pkgbase=self.pkgbase, + repo__testing=self.repo.testing, + repo__staging=self.repo.staging).order_by( + 'pkgname', 'repo__name', 'arch__name') + def __unicode__(self): return u'%s from %s on %s' % (self.pkgbase, self.who(), self.created) |