diff --git a/franklincce/explorer/templates/explorer/index.html b/franklincce/explorer/templates/explorer/index.html
index e9222f4..268679e 100644
--- a/franklincce/explorer/templates/explorer/index.html
+++ b/franklincce/explorer/templates/explorer/index.html
@@ -16,7 +16,7 @@
{% endfor %}
{% else %}
-
No texts available
+ No texts available. If you're the admin, you need to add some texts with the admin interface.
{% endif %}
About this instance
diff --git a/franklincce/explorer/views.py b/franklincce/explorer/views.py
index 1c64100..58b3875 100644
--- a/franklincce/explorer/views.py
+++ b/franklincce/explorer/views.py
@@ -7,7 +7,11 @@ from random import sample
def index(request):
legislative_texts = list(LegislativeText.objects.all())
- legislative_texts = sample(legislative_texts, 5)
+ try:
+ legislative_texts = sample(legislative_texts, 5)
+ except ValueError:
+ # there's not enough texts, so just return nothing
+ legislative_texts = []
context = {
"legislative_texts": legislative_texts,
}