From bc19d7c658036de3ecd0df3d4388ff5b727d7ba0 Mon Sep 17 00:00:00 2001 From: Joachim Date: Sun, 1 Jan 2023 19:45:12 +0100 Subject: [PATCH] Black --- bookwyrm/views/reading.py | 2 +- bookwyrm/views/shelf/shelf_actions.py | 4 ++-- bookwyrm/views/status.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bookwyrm/views/reading.py b/bookwyrm/views/reading.py index 587c0d8d9..42e8d560a 100644 --- a/bookwyrm/views/reading.py +++ b/bookwyrm/views/reading.py @@ -43,7 +43,7 @@ class ReadingStatus(View): @transaction.atomic def post(self, request, status, book_id): """Change the state of a book by shelving it and adding reading dates""" - next_step = request.META.get('HTTP_REFERER') + next_step = request.META.get("HTTP_REFERER") next_step = validate_url_domain(next_step, "/") identifier = { "want": models.Shelf.TO_READ, diff --git a/bookwyrm/views/shelf/shelf_actions.py b/bookwyrm/views/shelf/shelf_actions.py index da86cc853..b597bd35f 100644 --- a/bookwyrm/views/shelf/shelf_actions.py +++ b/bookwyrm/views/shelf/shelf_actions.py @@ -36,7 +36,7 @@ def delete_shelf(request, shelf_id): @transaction.atomic def shelve(request): """put a book on a user's shelf""" - next_step = request.META.get('HTTP_REFERER') + next_step = request.META.get("HTTP_REFERER") next_step = validate_url_domain(next_step, "/") book = get_object_or_404(models.Edition, id=request.POST.get("book")) desired_shelf = get_object_or_404( @@ -98,7 +98,7 @@ def shelve(request): @require_POST def unshelve(request, book_id=False): """remove a book from a user's shelf""" - next_step = request.META.get('HTTP_REFERER') + next_step = request.META.get("HTTP_REFERER") next_step = validate_url_domain(next_step, "/") identity = book_id if book_id else request.POST.get("book") book = get_object_or_404(models.Edition, id=identity) diff --git a/bookwyrm/views/status.py b/bookwyrm/views/status.py index f703f8b77..52f547cdd 100644 --- a/bookwyrm/views/status.py +++ b/bookwyrm/views/status.py @@ -59,7 +59,7 @@ class CreateStatus(View): # pylint: disable=too-many-branches def post(self, request, status_type, existing_status_id=None): """create status of whatever type""" - next_step = request.META.get('HTTP_REFERER') + next_step = request.META.get("HTTP_REFERER") next_step = validate_url_domain(next_step, "/") created = not existing_status_id existing_status = None @@ -170,7 +170,7 @@ def update_progress(request, book_id): # pylint: disable=unused-argument def edit_readthrough(request): """can't use the form because the dates are too finnicky""" # TODO: remove this, it duplicates the code in the ReadThrough view - next_step = request.META.get('HTTP_REFERER') + next_step = request.META.get("HTTP_REFERER") next_step = validate_url_domain(next_step, "/") readthrough = get_object_or_404(models.ReadThrough, id=request.POST.get("id"))