summaryrefslogtreecommitdiff
path: root/app/controllers/import/base_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/import/base_controller.rb')
-rw-r--r--app/controllers/import/base_controller.rb4
1 files changed, 2 insertions, 2 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