From eee8afb0b711205b793cb881ad6e875305d6d45e Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 5 Feb 2017 19:39:00 +0100 Subject: Remove bios from blocked users list, filter out broken entries from API response --- app/controllers/api/v1/blocks_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers') diff --git a/app/controllers/api/v1/blocks_controller.rb b/app/controllers/api/v1/blocks_controller.rb index b9816e052..08aefc175 100644 --- a/app/controllers/api/v1/blocks_controller.rb +++ b/app/controllers/api/v1/blocks_controller.rb @@ -9,7 +9,7 @@ class Api::V1::BlocksController < ApiController def index results = Block.where(account: current_account).paginate_by_max_id(limit_param(DEFAULT_ACCOUNTS_LIMIT), params[:max_id], params[:since_id]) accounts = Account.where(id: results.map(&:target_account_id)).map { |a| [a.id, a] }.to_h - @accounts = results.map { |f| accounts[f.target_account_id] } + @accounts = results.map { |f| accounts[f.target_account_id] }.compact set_account_counters_maps(@accounts) -- cgit