Fixes follows
Yikes
This commit is contained in:
parent
5ca1e0a827
commit
363609e7be
2 changed files with 48 additions and 2 deletions
|
@ -17,10 +17,13 @@ def follow(request):
|
|||
except models.User.DoesNotExist:
|
||||
return HttpResponseBadRequest()
|
||||
|
||||
models.UserFollowRequest.objects.get_or_create(
|
||||
rel, _ = models.UserFollowRequest.objects.get_or_create(
|
||||
user_subject=request.user,
|
||||
user_object=to_follow,
|
||||
)
|
||||
|
||||
if to_follow.local and not to_follow.manually_approves_followers:
|
||||
rel.accept()
|
||||
return redirect(to_follow.local_path)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue