Fixing user gallery tags filter to be on slug rather than name.
authorChristopher Allan Webber <cwebber@dustycloud.org>
Thu, 21 Feb 2013 22:13:56 +0000 (16:13 -0600)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Thu, 21 Feb 2013 22:13:56 +0000 (16:13 -0600)
This commit sponsored by Kat Walsh.  Thanks, Kat!

mediagoblin/user_pages/views.py

index 4056ba97ceb7f9e6a37374451050bc05f4a82902..601eef1775b183a0c709ab09104710cac2de4a43 100644 (file)
@@ -90,7 +90,7 @@ def user_gallery(request, page, url_user=None):
     if tag:
         cursor = cursor.filter(
             MediaEntry.tags_helper.any(
-                MediaTag.name == request.matchdict['tag']))
+                MediaTag.slug == request.matchdict['tag']))
 
     # Paginate gallery
     pagination = Pagination(page, cursor)