about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authoralpaca-tc <alpaca-tc@alpaca.tc>2017-05-31 22:10:26 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-05-31 15:10:26 +0200
commit3652a39de0d40acad1f2b170c74338b4fda01359 (patch)
treecf292e486dd5b2dd81d46ee92bcb491ac6003f2a /app
parent79335e46fd784f21ef5e9c8ae861e6820e422e29 (diff)
Account.find_remote should be raise ActiveRecord::RecordNotFound (#3476)
Diffstat (limited to 'app')
-rw-r--r--app/models/account.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index f5ac89257..cb116dbaf 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -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