mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-23 00:26:33 +00:00
parent
6c69c010a6
commit
d77f1b9882
1 changed files with 6 additions and 2 deletions
|
@ -272,7 +272,9 @@ def follow(request):
|
|||
to_follow = models.User.objects.get(id=to_follow)
|
||||
|
||||
outgoing.handle_outgoing_follow(request.user, to_follow)
|
||||
return redirect('/user/%s' % to_follow.username)
|
||||
user_slug = to_follow.localname if to_follow.localname \
|
||||
else to_follow.username
|
||||
return redirect('/user/%s' % user_slug)
|
||||
|
||||
|
||||
@login_required
|
||||
|
@ -281,7 +283,9 @@ def unfollow(request):
|
|||
user = request.user
|
||||
to_unfollow = models.User.objects.get(id=request.POST.get('user'))
|
||||
outgoing.handle_outgoing_unfollow(user, to_unfollow)
|
||||
return redirect('/user/%s' % to_unfollow.username)
|
||||
user_slug = to_unfollow.localname if to_unfollow.localname \
|
||||
else to_unfollow.username
|
||||
return redirect('/user/%s' % user_slug)
|
||||
|
||||
|
||||
@login_required
|
||||
|
|
Loading…
Reference in a new issue