Permalink
Browse files

fix a bug when enter badge show page

  • Loading branch information...
1 parent 43c3b6c commit 130c6482afc5edf37b94e60e99027e32ec10ca73 @chagel committed Feb 3, 2010
Showing with 3 additions and 3 deletions.
  1. +1 −2 forum/views.py
  2. +2 −1 templates/badge.html
View
3 forum/views.py
@@ -1820,8 +1820,7 @@ def badge(request, id):
tables=['award', 'auth_user'],
where=['badge_id=%s AND user_id=auth_user.id'],
params=[id]
- ).values('id').distinct()
-
+ ).distinct('auth_user.id')
return render_to_response('badge.html', {
'awards': awards,
'badge': badge,
View
3 templates/badge.html
@@ -28,7 +28,8 @@
</div>
<div id="award-list" style="clear:both;margin-left:20px;line-height:25px;">
{% for award in awards %}
- <p style="width:185px;float:left"><a href="/users/{{ award.id }}/{{ award.name }}">{{ award.name }}</a> {% get_score_badge_by_details award.rep award.gold award.silver award.bronze %}</p>
+ <p style="width:185px;float:left"><a href="/users/{{ award.id }}/{{ award.name }}">{{ award.name }}</a>
+ {% get_score_badge_by_details award.rep award.gold award.silver award.bronze %}</p>
{% endfor %}
</div>

0 comments on commit 130c648

Please sign in to comment.