From f01ad82aba8f526e1fe59880d40839fb0e08642a Mon Sep 17 00:00:00 2001 From: Jeff Knupp Date: Mon, 28 Apr 2014 18:48:42 -0400 Subject: [PATCH] Don't try to access first element of collection when list is empty (fixes #76) --- sandman/templates/collection.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sandman/templates/collection.html b/sandman/templates/collection.html index b91955c..29e1e07 100644 --- a/sandman/templates/collection.html +++ b/sandman/templates/collection.html @@ -2,6 +2,7 @@ {% block content %}
+{% if resources %}

{{ resources[0].__tablename__ }}

@@ -25,4 +26,7 @@

{{ resources[0].__tablename__ }}

{% endfor %} {% endfor %}
+{% else %} +

Empty collection

+{% endif %} {% endblock content%}