]> cat aescling's git repositories - mastodon.git/commitdiff
Fix list of local followers showing remote followers in admin UI (#9700)
authorEugen Rochko <eugen@zeonfederated.com>
Thu, 3 Jan 2019 05:40:16 +0000 (06:40 +0100)
committerGitHub <noreply@github.com>
Thu, 3 Jan 2019 05:40:16 +0000 (06:40 +0100)
app/controllers/admin/followers_controller.rb

index 819628b2011b576bbbd501384d667e0e16229a35..d826f47c5ae81f752de8adf0d268379beeec227b 100644 (file)
@@ -8,15 +8,11 @@ module Admin
 
     def index
       authorize :account, :index?
-      @followers = followers.recent.page(params[:page]).per(PER_PAGE)
+      @followers = @account.followers.local.recent.page(params[:page]).per(PER_PAGE)
     end
 
     def set_account
       @account = Account.find(params[:account_id])
     end
-
-    def followers
-      Follow.includes(:account).where(target_account: @account)
-    end
   end
 end