forked from jasder/forgeplus
FIX query projects bug
This commit is contained in:
parent
0a80b7c43f
commit
b15f4e904b
|
@ -85,6 +85,7 @@ class Project < ApplicationRecord
|
||||||
puts project.id
|
puts project.id
|
||||||
next if project.owner.blank?
|
next if project.owner.blank?
|
||||||
if project.repository.blank?
|
if project.repository.blank?
|
||||||
|
puts "########### start create repositoy #############"
|
||||||
Repository.create!(project_id: project.id, identifier: Project.generate_identifier, user_id: project&.owner&.id)
|
Repository.create!(project_id: project.id, identifier: Project.generate_identifier, user_id: project&.owner&.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -10,7 +10,7 @@ class Projects::ListQuery < ApplicationQuery
|
||||||
end
|
end
|
||||||
|
|
||||||
def call
|
def call
|
||||||
scope = Project.like(params[:search])
|
scope = Project.visible.like(params[:search])
|
||||||
.with_project_type(params[:project_type])
|
.with_project_type(params[:project_type])
|
||||||
.with_project_category(params[:category_id])
|
.with_project_category(params[:category_id])
|
||||||
.with_project_language(params[:language_id])
|
.with_project_language(params[:language_id])
|
||||||
|
|
Loading…
Reference in New Issue