From d6767e42fc44e17b1167da5034ecb8137c03fc9f Mon Sep 17 00:00:00 2001 From: Vivianne Langdon Date: Fri, 11 Mar 2022 22:28:05 -0800 Subject: [PATCH] fix variable clash --- bookwyrm/views/author.py | 4 ++-- bookwyrm/views/books/books.py | 4 ++-- bookwyrm/views/feed.py | 4 ++-- bookwyrm/views/group.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bookwyrm/views/author.py b/bookwyrm/views/author.py index c53ba52b..9bb7c644 100644 --- a/bookwyrm/views/author.py +++ b/bookwyrm/views/author.py @@ -27,8 +27,8 @@ class Author(View): if is_api_request(request): return ActivitypubResponse(author.to_activity()) - if redirect := maybe_redirect_local_path(request, author): - return redirect + if redirect_local_path := maybe_redirect_local_path(request, author): + return redirect_local_path books = ( models.Work.objects.filter(Q(authors=author) | Q(editions__authors=author)) diff --git a/bookwyrm/views/books/books.py b/bookwyrm/views/books/books.py index f57ff023..4b813459 100644 --- a/bookwyrm/views/books/books.py +++ b/bookwyrm/views/books/books.py @@ -50,8 +50,8 @@ class Book(View): if not book or not book.parent_work: raise Http404() - if redirect := not user_statuses and maybe_redirect_local_path(request, book): - return redirect + if redirect_local_path := not user_statuses and maybe_redirect_local_path(request, book): + return redirect_local_path # all reviews for all editions of the book reviews = models.Review.privacy_filter(request.user).filter( diff --git a/bookwyrm/views/feed.py b/bookwyrm/views/feed.py index 404ec1f6..2814e939 100644 --- a/bookwyrm/views/feed.py +++ b/bookwyrm/views/feed.py @@ -131,8 +131,8 @@ class Status(View): status.to_activity(pure=not is_bookwyrm_request(request)) ) - if redirect := maybe_redirect_local_path(request, status): - return redirect + if redirect_local_path := maybe_redirect_local_path(request, status): + return redirect_local_path visible_thread = ( models.Status.privacy_filter(request.user) diff --git a/bookwyrm/views/group.py b/bookwyrm/views/group.py index 75c4dcf1..9c282e48 100644 --- a/bookwyrm/views/group.py +++ b/bookwyrm/views/group.py @@ -27,8 +27,8 @@ class Group(View): group = get_object_or_404(models.Group, id=group_id) group.raise_visible_to_user(request.user) - if redirect := maybe_redirect_local_path(request, group): - return redirect + if redirect_local_path := maybe_redirect_local_path(request, group): + return redirect_local_path lists = ( models.List.privacy_filter(request.user)