summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2012-11-15 01:00:13 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2012-11-15 01:00:13 -0500
commitaa2836cb3859e05e9524def5ec37706e3299205c (patch)
treeca1de8b399b578aeb5b86490451a136d9986ad1a /main
parent12984bca989485430d3a1be9ea35d3f61239b28f (diff)
parentc3ebf7deae0bb04f1637e9a52e7f9f38d454fec7 (diff)
Merge tag 'release_2012-02-11'
Quick release Conflicts: requirements.txt requirements_prod.txt
Diffstat (limited to 'main')
-rw-r--r--main/models.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/main/models.py b/main/models.py
index d72f2c05..15a92662 100644
--- a/main/models.py
+++ b/main/models.py
@@ -312,6 +312,17 @@ class Package(models.Model):
repo__testing=self.repo.testing, repo__staging=self.repo.staging,
pkgbase=self.pkgbase).exclude(id=self.id)
+ def flag_request(self):
+ if not self.flag_date:
+ return None
+ from packages.models import FlagRequest
+ try:
+ request = FlagRequest.objects.filter(pkgbase=self.pkgbase,
+ repo=self.repo).latest()
+ return request
+ except FlagRequest.DoesNotExist:
+ return None
+
def is_same_version(self, other):
'is this package similar, name and version-wise, to another'
return self.pkgname == other.pkgname \