summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-03-27 16:58:02 -0500
committerDan McGee <dan@archlinux.org>2010-03-27 18:09:42 -0500
commit1113462edcf69b81e93a9545198c1091e3bf6703 (patch)
tree84503426ee60cf85746914f2729ec1236fa22df5 /main
parente317cf560aeb02c38b97193472f31a0caf92ce16 (diff)
Simplify code now that pkgbase is always definedrelease_2010-03-28
This allows some of our queries to get a lot simpler as well as removing the pkgbase_safe property added earlier. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'main')
-rw-r--r--main/models.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/main/models.py b/main/models.py
index 309d6b67..5ec38ceb 100644
--- a/main/models.py
+++ b/main/models.py
@@ -204,15 +204,9 @@ class Package(models.Model):
self.arch.name, self.pkgname)
@property
- def pkgbase_safe(self):
- if self.pkgbase:
- return self.pkgbase
- return self.pkgname
-
- @property
def maintainers(self):
return User.objects.filter(
- package_relations__pkgbase=self.pkgbase_safe,
+ package_relations__pkgbase=self.pkgbase,
package_relations__type=PackageRelation.MAINTAINER)
@property
@@ -283,7 +277,7 @@ class Package(models.Model):
root = 'community'
else:
root = 'packages'
- return linkbase % (root, self.pkgbase_safe, svnpath)
+ return linkbase % (root, self.pkgbase, svnpath)
def get_arch_svn_link(self):
repo = self.repo.name.lower()