diff --git a/bookwyrm/templates/user/shelf.html b/bookwyrm/templates/user/shelf.html
index 5173da07..8d23dce4 100644
--- a/bookwyrm/templates/user/shelf.html
+++ b/bookwyrm/templates/user/shelf.html
@@ -20,10 +20,13 @@
- {% if is_self %}
+ {% if is_self and shelf.id %}
{% trans "Edit shelf" as button_text %}
{% include 'snippets/toggle/open_button.html' with text=button_text icon="pencil" controls_text="edit-shelf-form" focus="edit-shelf-form-header" %}
@@ -81,7 +84,6 @@
{% endif %}
{% for book in books %}
- {% with book=book.book %}
{% include 'snippets/book_cover.html' with book=book size="small" %}
@@ -113,13 +115,12 @@
|
{% endif %}
- {% endwith %}
{% endfor %}
{% else %}
{% trans "This shelf is empty." %}
- {% if shelf.editable %}
+ {% if shelf.id and shelf.editable %}