aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-06-22 13:57:34 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-06-22 13:57:34 -0500
commit54de443a6a6cd673cfef0efa73a9d5e6fc6cde7c (patch)
tree985c34abd1ad0da62c4330c3a5852d43a2244de8
parent3a2b22e34607fce05a74732a40bb8e49115129bb (diff)
downloadmediagoblin-54de443a6a6cd673cfef0efa73a9d5e6fc6cde7c.tar.lz
mediagoblin-54de443a6a6cd673cfef0efa73a9d5e6fc6cde7c.tar.xz
mediagoblin-54de443a6a6cd673cfef0efa73a9d5e6fc6cde7c.zip
Check on media['uploader']'s id rather than the username
This skips making an extra query to retrieve the uploader object and also checks on the canonical ID, which is probably good (even if indexing should ensure uniqueness there).
-rw-r--r--mediagoblin/templates/mediagoblin/user_pages/media.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html
index ade7f0c6..d221f61e 100644
--- a/mediagoblin/templates/mediagoblin/user_pages/media.html
+++ b/mediagoblin/templates/mediagoblin/user_pages/media.html
@@ -35,7 +35,7 @@
<a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
user= media.uploader().username) }}">
{{- media.uploader().username }}</a></p>
- {% if media.uploader().username == request.user.username %}
+ {% if media['uploader'] == request.user['_id'] %}
<p><a href="{{ request.urlgen('mediagoblin.edit.edit_media',
user= media.uploader().username,
media= media._id) }}">Edit</a></p>