更改:导入失败项目不显示在项目列表
This commit is contained in:
		
							parent
							
								
									30a17f53b3
								
							
						
					
					
						commit
						0187851a04
					
				| 
						 | 
					@ -36,6 +36,8 @@ class ProjectsController < ApplicationController
 | 
				
			||||||
  def index
 | 
					  def index
 | 
				
			||||||
    scope = current_user.logged? ? Projects::ListQuery.call(params, current_user.id) : Projects::ListQuery.call(params)
 | 
					    scope = current_user.logged? ? Projects::ListQuery.call(params, current_user.id) : Projects::ListQuery.call(params)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    scope = scope.joins(repository: :mirror).where.not(mirrors: {status: 2}) # 导入失败项目不显示
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @projects = kaminari_paginate(scope.includes(:project_category, :project_language, :repository, :project_educoder, :owner, :project_units, :project_topics))
 | 
					    @projects = kaminari_paginate(scope.includes(:project_category, :project_language, :repository, :project_educoder, :owner, :project_units, :project_topics))
 | 
				
			||||||
    # @projects = paginate scope.includes(:project_category, :project_language, :repository, :project_educoder, :owner, :project_units)
 | 
					    # @projects = paginate scope.includes(:project_category, :project_language, :repository, :project_educoder, :owner, :project_units)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue