Commit 192ccaeb authored by JB Vasseur's avatar JB Vasseur

Disable offense on the appropriate line only !22296

parent 9f340839
......@@ -7,20 +7,16 @@ class ApplicationsFinder
@params = params
end
# rubocop: disable CodeReuse/ActiveRecord
def execute
applications = Doorkeeper::Application.where(owner_id: nil)
applications = Doorkeeper::Application.where(owner_id: nil) # rubocop: disable CodeReuse/ActiveRecord
by_id(applications)
end
# rubocop: enable CodeReuse/ActiveRecord
private
# rubocop: disable CodeReuse/ActiveRecord
def by_id(applications)
return applications unless params[:id]
Doorkeeper::Application.find_by(id: params[:id])
Doorkeeper::Application.find_by(id: params[:id]) # rubocop: disable CodeReuse/ActiveRecord
end
# rubocop: enable CodeReuse/ActiveRecord
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment