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 ...@@ -7,20 +7,16 @@ class ApplicationsFinder
@params = params @params = params
end end
# rubocop: disable CodeReuse/ActiveRecord
def execute def execute
applications = Doorkeeper::Application.where(owner_id: nil) applications = Doorkeeper::Application.where(owner_id: nil) # rubocop: disable CodeReuse/ActiveRecord
by_id(applications) by_id(applications)
end end
# rubocop: enable CodeReuse/ActiveRecord
private private
# rubocop: disable CodeReuse/ActiveRecord
def by_id(applications) def by_id(applications)
return applications unless params[:id] return applications unless params[:id]
Doorkeeper::Application.find_by(id: params[:id]) Doorkeeper::Application.find_by(id: params[:id]) # rubocop: disable CodeReuse/ActiveRecord
end end
# rubocop: enable CodeReuse/ActiveRecord
end 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