Browse Source

FIX query projects bug

tags/v1
Jasder 6 years ago
parent
commit
b15f4e904b
2 changed files with 2 additions and 1 deletions
  1. +1
    -0
      app/models/project.rb
  2. +1
    -1
      app/queries/projects/list_query.rb

+ 1
- 0
app/models/project.rb View File

@@ -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


+ 1
- 1
app/queries/projects/list_query.rb View File

@@ -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])


Loading…
Cancel
Save