From 762d4a0c48e582dba78a27f1a42e367d3f14a891 Mon Sep 17 00:00:00 2001 From: Elrond Date: Fri, 13 Jan 2012 23:38:21 +0100 Subject: [PATCH] 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. --- mediagoblin/templates/mediagoblin/user_pages/user.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -%} -- 2.25.1