diff --git a/app/models/project.rb b/app/models/project.rb index d1f793d..c600f86 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -85,6 +85,7 @@ class Project < ApplicationRecord puts project.id next if project.owner.blank? if project.repository.blank? + puts "########### start create repositoy #############" Repository.create!(project_id: project.id, identifier: Project.generate_identifier, user_id: project&.owner&.id) end end diff --git a/app/queries/projects/list_query.rb b/app/queries/projects/list_query.rb index 0efc8cb..081e992 100644 --- a/app/queries/projects/list_query.rb +++ b/app/queries/projects/list_query.rb @@ -10,7 +10,7 @@ class Projects::ListQuery < ApplicationQuery end def call - scope = Project.like(params[:search]) + scope = Project.visible.like(params[:search]) .with_project_type(params[:project_type]) .with_project_category(params[:category_id]) .with_project_language(params[:language_id])