From: Christopher Allan Webber Date: Sun, 13 Nov 2011 20:40:11 +0000 (-0600) Subject: If the gallery view makes sure we have a user anyway, do we need this check? X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7fc25d27208ef9926e94eeba953160ffbe676942;p=mediagoblin.git If the gallery view makes sure we have a user anyway, do we need this check? Seems like the classic annoying "SHOULD NEVER HAPPEN" else: statement :) --- diff --git a/mediagoblin/templates/mediagoblin/user_pages/gallery.html b/mediagoblin/templates/mediagoblin/user_pages/gallery.html index df931d9c..86105493 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/gallery.html +++ b/mediagoblin/templates/mediagoblin/user_pages/gallery.html @@ -27,28 +27,23 @@ {% endblock mediagoblin_head %} {% block mediagoblin_content -%} - {% if user %} -

- {%- trans username=user.username, - user_url=request.urlgen( - 'mediagoblin.user_pages.user_home', - user=user.username) -%} - {{ username }}'s media - {%- endtrans %} -

+

+ {%- trans username=user.username, + user_url=request.urlgen( + 'mediagoblin.user_pages.user_home', + user=user.username) -%} + {{ username }}'s media + {%- endtrans %} +

- + -
- {% set feed_url = request.urlgen( - 'mediagoblin.user_pages.atom_feed', - user=user.username) %} - {% include "mediagoblin/utils/feed_link.html" %} -
- {% else %} - {# This *should* not occur as the view makes sure we pass in a user. #} -

{% trans %}Sorry, no such user found.{% endtrans %}

- {% endif %} +

+ {% set feed_url = request.urlgen( + 'mediagoblin.user_pages.atom_feed', + user=user.username) %} + {% include "mediagoblin/utils/feed_link.html" %} +
{% endblock %}