mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-24 03:43:42 +01:00
Fix error when unfollowing somebody who wasn't followed in the first place
This commit is contained in:
parent
d022975444
commit
e239fc3050
1 changed files with 2 additions and 1 deletions
|
@ -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…
Reference in a new issue