summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2013-01-09 08:02:19 -0500
committerDan McGee <dan@archlinux.org>2013-01-12 15:51:51 -0600
commit255a992c151b1c9386c3450083144447be2ce27a (patch)
treed3d6709a90f8a1bf4473a7fbd918e15864aed18d
parentec2ab9ba35e83dce20789b48f52f3aec02d788fc (diff)
Add get_associated_packages method to FlagRequest
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--packages/models.py7
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)