If the gallery view makes sure we have a user anyway, do we need this check?
authorChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 13 Nov 2011 20:40:11 +0000 (14:40 -0600)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 13 Nov 2011 20:40:11 +0000 (14:40 -0600)
Seems like the classic annoying "SHOULD NEVER HAPPEN" else: statement :)

mediagoblin/templates/mediagoblin/user_pages/gallery.html

index df931d9c012ccd6708713dc77ae05067f70da7e4..86105493f330796367047c4a9f20b18dca8e90fe 100644 (file)
 {% endblock mediagoblin_head %}
 
 {% block mediagoblin_content -%}
-  {% if user %}
-    <h1>
-      {%- trans username=user.username,
-                user_url=request.urlgen(
-                           'mediagoblin.user_pages.user_home',
-                            user=user.username) -%}
-        <a href="{{ user_url }}">{{ username }}</a>'s media
-      {%- endtrans %}
-    </h1>
+  <h1>
+    {%- trans username=user.username,
+              user_url=request.urlgen(
+                         'mediagoblin.user_pages.user_home',
+                          user=user.username) -%}
+      <a href="{{ user_url }}">{{ username }}</a>'s media
+    {%- endtrans %}
+  </h1>
 
-    <div class="container_16 media_gallery">
-      {{ object_gallery(request, media_entries, pagination) }}
-    </div>
+  <div class="container_16 media_gallery">
+    {{ object_gallery(request, media_entries, pagination) }}
+  </div>
 
-    <div class="grid_16">
-      {% set feed_url = request.urlgen(
-                'mediagoblin.user_pages.atom_feed',
-                user=user.username) %}
-      {% include "mediagoblin/utils/feed_link.html" %}
-    </div>
-  {% else %}
-    {# This *should* not occur as the view makes sure we pass in a user. #}
-    <p>{% trans %}Sorry, no such user found.{% endtrans %}<p/>
-  {% endif %}
+  <div class="grid_16">
+    {% set feed_url = request.urlgen(
+              'mediagoblin.user_pages.atom_feed',
+              user=user.username) %}
+    {% include "mediagoblin/utils/feed_link.html" %}
+  </div>
 {% endblock %}