mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-24 18:13:42 +01:00
Account.find_remote should be raise ActiveRecord::RecordNotFound (#3476)
This commit is contained in:
parent
79335e46fd
commit
3652a39de0
1 changed files with 1 additions and 1 deletions
|
@ -167,7 +167,7 @@ class Account < ApplicationRecord
|
|||
end
|
||||
|
||||
def find_remote!(username, domain)
|
||||
return if username.blank?
|
||||
raise ActiveRecord::RecordNotFound if username.blank?
|
||||
where('lower(accounts.username) = ?', username.downcase).where(domain.nil? ? { domain: nil } : 'lower(accounts.domain) = ?', domain&.downcase).take!
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue