From 492561c405393177ebaceafaf5008bfdd033cb0e Mon Sep 17 00:00:00 2001 From: xxq250 Date: Mon, 21 Apr 2025 16:56:18 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20=E7=BB=84=E7=BB=87=E6=B5=81=E6=B0=B4?= =?UTF-8?q?=E7=BA=BF=E6=8C=89=E4=BB=93=E5=BA=93=E5=88=86=E9=A1=B5sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/api/pm/pipelines_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/pm/pipelines_controller.rb b/app/controllers/api/pm/pipelines_controller.rb index 3ddfa350b..933417ff2 100644 --- a/app/controllers/api/pm/pipelines_controller.rb +++ b/app/controllers/api/pm/pipelines_controller.rb @@ -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)