From: Elrond Date: Fri, 13 Jan 2012 22:38:21 +0000 (+0100) Subject: Fix request.user==None error X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=762d4a0c48e582dba78a27f1a42e367d3f14a891;p=mediagoblin.git Fix request.user==None error If one isn't logged in and views the profile of a user without media, one gets a problem, because request.user is None and has no _id attribute. Fix this. --- diff --git a/mediagoblin/templates/mediagoblin/user_pages/user.html b/mediagoblin/templates/mediagoblin/user_pages/user.html index 0937f97a..d3b4021d 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/user.html +++ b/mediagoblin/templates/mediagoblin/user_pages/user.html @@ -145,7 +145,7 @@ {% include "mediagoblin/utils/feed_link.html" %} {% else %} - {% if request.user._id == user._id %} + {% if request.user and (request.user._id == user._id) %}

{% trans -%}