bodhi/controllers.py | 9 ++++++++-
bodhi/templates/show.kid | 2 +-
2 files changed, 9 insertions(+), 2 deletions(-)
New commits:
commit 0d1803571b4b65e5d18a075152e37ca1b97a2f09
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Jul 22 23:45:58 2010 -0400
Link up the usernames for authenticated comments
diff --git a/bodhi/templates/show.kid b/bodhi/templates/show.kid
index 6592e41..f376b43 100644
--- a/bodhi/templates/show.kid
+++ b/bodhi/templates/show.kid
@@ -246,7 +246,7 @@ karma = "<img src=\"%s\" align=\"top\"
/> <b>%d</b>" % (tg.url('/static/images/k
</div>
</div>
<div py:if="not comment.anonymous">
- <b>${comment.author}</b> - ${comment.timestamp}<br/>
+ <b><a href="${tg.url('/user/%s' %
comment.author)}">${comment.author}</a></b> -
${comment.timestamp}<br/>
</div>
<div class="comment-text"
py:replace="comment.text">Comment</div>
</div>
commit 40d6381611af911dc65c77e4a449da87887507ce
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Jul 22 23:45:27 2010 -0400
Make our list() API handle release names like EL-5 and el5 properly.
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 43516d2..1612bed 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -270,10 +270,11 @@ class Root(controllers.RootController):
try:
rel = Release.byName(release.upper())
except SQLObjectNotFound:
- try:
- rel = Release.byName(release.replace('-',
'').upper())
- except SQLObjectNotFound:
- return dict(error="Unknown release %r" % release)
+ # Make names like EL-5 and el5 both find the right release
+ for r in Release.select():
+ if r.name.upper().replace('-', '') ==
release.replace('-', '').upper():
+ rel = r
+ return dict(error="Unknown release %r" % release)
query.append(PackageUpdate.q.releaseID == rel.id)
if status:
query.append(PackageUpdate.q.status == status)
commit 72fc83efe28158e0ba824bf2379576bdb7efb5ee
Author: Luke Macken <lmacken(a)redhat.com>
Date: Wed Jul 21 13:18:02 2010 -0400
Return an error message if the specified release doesn't exist.
Also, look for the release again without the '-' just in case.
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 357dc44..43516d2 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -267,7 +267,13 @@ class Root(controllers.RootController):
# another value to the output which indicates if the.
# logged in user is allowed to create a new update for.
# this package
- rel = Release.byName(release.upper())
+ try:
+ rel = Release.byName(release.upper())
+ except SQLObjectNotFound:
+ try:
+ rel = Release.byName(release.replace('-',
'').upper())
+ except SQLObjectNotFound:
+ return dict(error="Unknown release %r" % release)
query.append(PackageUpdate.q.releaseID == rel.id)
if status:
query.append(PackageUpdate.q.status == status)
Show replies by date