about summary refs log tree commit diff
path: root/app/workers
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/after_remote_follow_request_worker.rb2
-rw-r--r--app/workers/after_remote_follow_worker.rb2
2 files changed, 2 insertions, 2 deletions
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)