X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ca5de5b4e01297b07ce3a9db45e908f15f7cda11..4fb775d6d516857066e0d3cc86877ead3f6cae08:/app/models/client_application.rb diff --git a/app/models/client_application.rb b/app/models/client_application.rb index 156eeafc7..152b3912d 100644 --- a/app/models/client_application.rb +++ b/app/models/client_application.rb @@ -18,7 +18,7 @@ class ClientApplication < ActiveRecord::Base attr_accessor :token_callback_url def self.find_token(token_key) - token = OauthToken.find_by_token(token_key, :include => :client_application) + token = OauthToken.includes(:client_application).find_by(:token => token_key) token if token && token.authorized? end