Browse Source

fixed 组织流水线按仓库分页sql

pull/348/head^2^2
xxq250 1 year ago
parent
commit
492561c405
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/controllers/api/pm/pipelines_controller.rb

+ 1
- 1
app/controllers/api/pm/pipelines_controller.rb View File

@@ -68,7 +68,7 @@ class Api::Pm::PipelinesController < Api::Pm::BaseController
# Rails.logger.info("@run_result======#{@run_result}")
@disabled_workflows = Gitea::RepoUnit.where(repo_id: project_gpids, type: 10).where("config is not null")
@pipelines = Action::Pipeline.select("distinct project_id,max(updated_at) as updated_at")
.where(project_id: @project_ids).group(:project_id).order(updated_at: :desc)
.where(project_id: @project_ids).group(:project_id).order("updated_at desc")
@pipelines = @pipelines.where("pipeline_name like ?", "%#{params[:pipeline_name]}%") if params[:pipeline_name].present?
@pipelines = @pipelines.where(pipeline_type: params[:pipeline_type]) if params[:pipeline_type].present?
@pipelines = kaminari_paginate(@pipelines)


Loading…
Cancel
Save