diff options
author | Rémy Coutable <remy@rymai.me> | 2019-08-09 17:34:45 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-08-09 17:34:45 +0300 |
commit | 39f9f0bdbb4cabcab14202270484b7c459483420 (patch) | |
tree | 940f6a561dd909bf6fe7b7eb0cd4d06d04101c8e | |
parent | 71d8815405b09046b2e4bcf0ea0a732d21c87e2a (diff) | |
parent | a4e13a5966b45e500b69117d080e4794d92c7668 (diff) |
Merge branch 'lib-differences' into 'master'
Resolve EE differences in the lib/ directory
See merge request gitlab-org/gitlab-ce!31582
-rw-r--r-- | lib/api/project_import.rb | 1 | ||||
-rw-r--r-- | lib/gitlab/project_search_results.rb | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/api/project_import.rb b/lib/api/project_import.rb index 71891e43dcc..bb1b037c08f 100644 --- a/lib/api/project_import.rb +++ b/lib/api/project_import.rb @@ -59,6 +59,7 @@ module API } override_params = import_params.delete(:override_params) + filter_attributes_using_license!(override_params) if override_params project = ::Projects::GitlabProjectsImportService.new( current_user, project_params, override_params diff --git a/lib/gitlab/project_search_results.rb b/lib/gitlab/project_search_results.rb index 827f4f77f36..5e77d31760d 100644 --- a/lib/gitlab/project_search_results.rb +++ b/lib/gitlab/project_search_results.rb @@ -134,9 +134,11 @@ module Gitlab project.repository.commit(key) if Commit.valid_hash?(key) end + # rubocop: disable CodeReuse/ActiveRecord def project_ids_relation - project + Project.where(id: project).select(:id).reorder(nil) end + # rubocop: enabled CodeReuse/ActiveRecord def filter_milestones_by_project(milestones) return Milestone.none unless Ability.allowed?(@current_user, :read_milestone, @project) |