Commit eb5cd3f2 authored by Gabriel Mazetto's avatar Gabriel Mazetto

Use find_by_id and remove rubocop skip flags

parent cca4fdf1
......@@ -24,13 +24,9 @@ module Gitlab
private
# rubocop: disable CodeReuse/ActiveRecord
def find_resource
Upload.find_by(id: object_db_id)
Upload.find_by_id(object_db_id)
end
# rubocop: enable CodeReuse/ActiveRecord
end
end
end
......
......@@ -19,13 +19,9 @@ module Gitlab
private
# rubocop: disable CodeReuse/ActiveRecord
def find_resource
::Ci::JobArtifact.find_by(id: object_db_id)
::Ci::JobArtifact.find_by_id(object_db_id)
end
# rubocop: enable CodeReuse/ActiveRecord
end
end
end
......
......@@ -19,13 +19,9 @@ module Gitlab
private
# rubocop: disable CodeReuse/ActiveRecord
def find_resource
LfsObject.find_by(id: object_db_id)
LfsObject.find_by_id(object_db_id)
end
# rubocop: enable CodeReuse/ActiveRecord
end
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