Make Rubocop happy

parent 67eac408
...@@ -6,6 +6,7 @@ module Geo ...@@ -6,6 +6,7 @@ module Geo
attachments.geo_syncable attachments.geo_syncable
end end
# rubocop:disable CodeReuse/ActiveRecord
def attachments def attachments
if selective_sync? if selective_sync?
Upload.where(group_uploads.or(project_uploads).or(other_uploads)) Upload.where(group_uploads.or(project_uploads).or(other_uploads))
...@@ -13,10 +14,11 @@ module Geo ...@@ -13,10 +14,11 @@ module Geo
Upload.all Upload.all
end end
end end
# rubocop:enable CodeReuse/ActiveRecord
private private
# rubocop: disable CodeReuse/ActiveRecord # rubocop:disable CodeReuse/ActiveRecord
def group_uploads def group_uploads
namespace_ids = namespace_ids =
if current_node.selective_sync_by_namespaces? if current_node.selective_sync_by_namespaces?
...@@ -35,7 +37,7 @@ module Geo ...@@ -35,7 +37,7 @@ module Geo
upload_table[:model_type].eq('Namespace').and(namespace_ids_in_sql) upload_table[:model_type].eq('Namespace').and(namespace_ids_in_sql)
end end
# rubocop: enable CodeReuse/ActiveRecord # rubocop:enable CodeReuse/ActiveRecord
def project_uploads def project_uploads
project_ids = current_node.projects.select(:id) project_ids = current_node.projects.select(:id)
......
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