bodhi/controllers.py | 6 ++++--
bodhi/masher.py | 4 ++--
bodhi/model.py | 2 +-
3 files changed, 7 insertions(+), 5 deletions(-)
New commits:
commit b55fc48dcb9737d2937b2aa0db32edfdccbbf7b3
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Oct 26 19:27:30 2011 -0400
A couple of more tweaks to get the URL scheme working properly.
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index f5c0030..71b91a2 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -1177,10 +1177,12 @@ class Root(controllers.RootController):
# /PackageUpdate.updateid/*
if args:
- update = PackageUpdate.select(PackageUpdate.q.updateid)
+ update = PackageUpdate.select(PackageUpdate.q.updateid == args[0])
if update.count():
+ update = update[0]
return dict(tg_template='bodhi.templates.show',
- update=update[0], comment_form=form)
+ update=update, comment_form=form,
+ updates=[], values={'title': update.title})
# /Package.name
if len(args) == 1:
diff --git a/bodhi/masher.py b/bodhi/masher.py
index a24e38e..01987ef 100644
--- a/bodhi/masher.py
+++ b/bodhi/masher.py
@@ -838,14 +838,14 @@ class MashTask(Thread):
if security_updates:
maildata += u'The following %s Security updates need
testing:\n\n' % prefix
for update in security_updates:
- maildata += u' %s\n' %
(config.get('base_address') + url(update.get_url(show_builds=True)))
+ maildata += u' %s\n' %
(config.get('base_address') + url(update.get_url()))
maildata += '\n\n'
critpath_updates = self.get_unapproved_critpath_updates(prefix)
if critpath_updates:
maildata += u'The following %s Critical Path updates have yet to
be approved:\n\n' % prefix
for update in self.get_unapproved_critpath_updates(prefix):
- maildata += u' %s\n' %
(config.get('base_address') + url(update.get_url(show_builds=True)))
+ maildata += u' %s\n' %
(config.get('base_address') + url(update.get_url()))
maildata += '\n\n'
except Exception, e:
log.exception(e)
diff --git a/bodhi/model.py b/bodhi/model.py
index 6e435d5..f03aa4a 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -665,7 +665,7 @@ class PackageUpdate(SQLObject):
else:
log.error("Cannot find mailing list address for update notice")
- def get_url(self, show_builds=False):
+ def get_url(self):
""" Return the relative URL to this update """
path = ['/']
if self.updateid:
Show replies by date