diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-24 15:09:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-24 15:09:01 +0300 |
commit | 2c2dd5e36c4ed5f09f488be288882d98f9124d12 (patch) | |
tree | ad4c478bb1c588387a881b26a7db7c3237b9d4f3 /app/controllers/import | |
parent | 2ff184ad761fbfbe25a3d827c8f704349963a8d2 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/import')
-rw-r--r-- | app/controllers/import/base_controller.rb | 4 | ||||
-rw-r--r-- | app/controllers/import/bitbucket_server_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/import/manifest_controller.rb | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/import/base_controller.rb b/app/controllers/import/base_controller.rb index f16f752f85b..04919a4b9d0 100644 --- a/app/controllers/import/base_controller.rb +++ b/app/controllers/import/base_controller.rb @@ -7,14 +7,14 @@ class Import::BaseController < ApplicationController # rubocop: disable CodeReuse/ActiveRecord def find_already_added_projects(import_type) - current_user.created_projects.where(import_type: import_type).includes(:import_state) + current_user.created_projects.where(import_type: import_type).with_import_state end # rubocop: enable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord def find_jobs(import_type) current_user.created_projects - .includes(:import_state) + .with_import_state .where(import_type: import_type) .to_json(only: [:id], methods: [:import_status]) end diff --git a/app/controllers/import/bitbucket_server_controller.rb b/app/controllers/import/bitbucket_server_controller.rb index dc72a4e4fd9..5fb7b5dccc5 100644 --- a/app/controllers/import/bitbucket_server_controller.rb +++ b/app/controllers/import/bitbucket_server_controller.rb @@ -82,7 +82,7 @@ class Import::BitbucketServerController < Import::BaseController # rubocop: disable CodeReuse/ActiveRecord def filter_added_projects(import_type, import_sources) - current_user.created_projects.where(import_type: import_type, import_source: import_sources).includes(:import_state) + current_user.created_projects.where(import_type: import_type, import_source: import_sources).with_import_state end # rubocop: enable CodeReuse/ActiveRecord diff --git a/app/controllers/import/manifest_controller.rb b/app/controllers/import/manifest_controller.rb index 7ba8b3ce938..9aec870c6ea 100644 --- a/app/controllers/import/manifest_controller.rb +++ b/app/controllers/import/manifest_controller.rb @@ -87,7 +87,7 @@ class Import::ManifestController < Import::BaseController group.all_projects .where(import_type: 'manifest') .where(creator_id: current_user) - .includes(:import_state) + .with_import_state end # rubocop: enable CodeReuse/ActiveRecord |