From 255a992c151b1c9386c3450083144447be2ce27a Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 9 Jan 2013 08:02:19 -0500 Subject: Add get_associated_packages method to FlagRequest Signed-off-by: Dan McGee --- packages/models.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'packages') diff --git a/packages/models.py b/packages/models.py index 18d57c5..ef86d8e 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) -- cgit v1.2.3-24-g4f1b