From a45953d350333e20c093bde4bda426cd16e80399 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Wed, 4 Jun 2025 15:36:40 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20=E6=B5=81=E6=B0=B4=E7=BA=BF=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E5=8F=82=E6=95=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/api/v1/projects/pipelines_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/v1/projects/pipelines_controller.rb b/app/controllers/api/v1/projects/pipelines_controller.rb index 305cc974f..6985e8b05 100644 --- a/app/controllers/api/v1/projects/pipelines_controller.rb +++ b/app/controllers/api/v1/projects/pipelines_controller.rb @@ -96,7 +96,7 @@ class Api::V1::Projects::PipelinesController < Api::V1::BaseController def save_yaml @pipeline = params[:id].present? ? Action::Pipeline.find(params[:id]) : Action::Pipeline.find_or_initialize_by(pipeline_name: params[:pipeline_name], project_id: @project.id) @pipeline.file_name = ".gitea/workflows/#{@pipeline.pipeline_name}.yml" - @pipeline.branch = params[:branch].to_json if params[:branch].present? + @pipeline.branch = params[:branch] if params[:branch].present? @pipeline.json = params[:pipeline_json].to_json if params[:pipeline_json].present? @pipeline.pipeline_name = params[:pipeline_name] if params[:pipeline_name].present? pipeline_yaml = params[:pipeline_yaml].present? ? params[:pipeline_yaml] : build_pipeline_yaml_new(@pipeline.pipeline_name, params[:pipeline_json])