From cc4469e7e10b674f31569831a7fce0787c3f15b3 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 4 Jan 2022 18:05:26 -0800 Subject: [PATCH] Python formatting --- bookwyrm/templates/snippets/shelve_button/shelve_button.html | 2 +- bookwyrm/views/reading.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bookwyrm/templates/snippets/shelve_button/shelve_button.html b/bookwyrm/templates/snippets/shelve_button/shelve_button.html index 98edac6a1..825eabb18 100644 --- a/bookwyrm/templates/snippets/shelve_button/shelve_button.html +++ b/bookwyrm/templates/snippets/shelve_button/shelve_button.html @@ -3,7 +3,7 @@ {% load cache %} {% if request.user.is_authenticated %} -{% cache 900 shelve_button request.user.id book.id %} +{% cache shelve_button request.user.id book.id %} {% with book.id|uuid as uuid %} {% active_shelf book as active_shelf %} diff --git a/bookwyrm/views/reading.py b/bookwyrm/views/reading.py index 6531efc23..73bc0b834 100644 --- a/bookwyrm/views/reading.py +++ b/bookwyrm/views/reading.py @@ -47,7 +47,9 @@ class ReadingStatus(View): return HttpResponseBadRequest() # invalidate the template cache - cache_key = make_template_fragment_key("shelve_button", [request.user.id, book_id]) + cache_key = make_template_fragment_key( + "shelve_button", [request.user.id, book_id] + ) cache.delete(cache_key) desired_shelf = get_object_or_404(