Browse Source

Fix error when unfollowing somebody who wasn't followed in the first place

closed-social-glitch-2 0.1.1-0-ge239fc305
Eugen Rochko 8 years ago
parent
commit
e239fc3050
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      app/models/account.rb

+ 2
- 1
app/models/account.rb View File

@ -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)

Loading…
Cancel
Save