about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index c92bb1574..524d05f86 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -36,7 +36,8 @@ class Account < ActiveRecord::Base
   end
 
   def unfollow!(other_account)
-    self.active_relationships.find_by(target_account: other_account).destroy
+    follow = self.active_relationships.find_by(target_account: other_account)
+    follow.destroy unless follow.nil?
   end
 
   def following?(other_account)