]> cat aescling's git repositories - mastodon.git/commitdiff
Fix #5952 - NameError (regression from #5762) (#5999)
authorEugen Rochko <eugen@zeonfederated.com>
Wed, 13 Dec 2017 03:12:38 +0000 (04:12 +0100)
committerGitHub <noreply@github.com>
Wed, 13 Dec 2017 03:12:38 +0000 (04:12 +0100)
* Fix #5952 - NameError (regression from #5762)

* Fix

app/services/follow_service.rb

index 20579ca63a2b7484bc5e987e79324f0e0f642495..ac0207a0ab048b2bfc1dbaa01a0e8eb92af3f1fe 100644 (file)
@@ -22,7 +22,7 @@ class FollowService < BaseService
     elsif source_account.requested?(target_account)
       # This isn't managed by a method in AccountInteractions, so we modify it
       # ourselves if necessary.
-      req = follow_requests.find_by(target_account: other_account)
+      req = source_account.follow_requests.find_by(target_account: target_account)
       req.update!(show_reblogs: reblogs)
       return
     end