From 720ff55262fec0abc630a613a4f3564b98b689dc Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 12 Feb 2017 17:28:15 +0100 Subject: Adding more unit tests. Fixing Salmon slaps XML --- app/workers/after_remote_follow_request_worker.rb | 2 +- app/workers/after_remote_follow_worker.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/workers') diff --git a/app/workers/after_remote_follow_request_worker.rb b/app/workers/after_remote_follow_request_worker.rb index ad94d2769..f1d6869cc 100644 --- a/app/workers/after_remote_follow_request_worker.rb +++ b/app/workers/after_remote_follow_request_worker.rb @@ -9,7 +9,7 @@ class AfterRemoteFollowRequestWorker follow_request = FollowRequest.find(follow_request_id) updated_account = FetchRemoteAccountService.new.call(follow_request.target_account.remote_url) - return if updated_account.locked? + return if updated_account.nil? || updated_account.locked? follow_request.destroy FollowService.new.call(follow_request.account, updated_account.acct) diff --git a/app/workers/after_remote_follow_worker.rb b/app/workers/after_remote_follow_worker.rb index 496aaf73e..0d04456a9 100644 --- a/app/workers/after_remote_follow_worker.rb +++ b/app/workers/after_remote_follow_worker.rb @@ -9,7 +9,7 @@ class AfterRemoteFollowWorker follow = Follow.find(follow_id) updated_account = FetchRemoteAccountService.new.call(follow.target_account.remote_url) - return unless updated_account.locked? + return if updated_account.nil? || !updated_account.locked? follow.destroy FollowService.new.call(follow.account, updated_account.acct) -- cgit