forked from mirrors/bookwyrm
fix variable clash
This commit is contained in:
parent
cf53134577
commit
d6767e42fc
4 changed files with 8 additions and 8 deletions
|
@ -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))
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue