修复:文件夹不存在处理

This commit is contained in:
yystopf 2025-02-11 09:12:27 +08:00
parent 5c2639773e
commit 8a052e30d8
1 changed files with 1 additions and 1 deletions

View File

@ -1,7 +1,7 @@
class Api::V1::Projects::Actions::ActionsController < Api::V1::Projects::Actions::BaseController
def new_index
@files = $gitea_client.get_repos_contents_by_owner_repo_filepath(@project&.owner&.login, @project&.identifier, ".gitea/workflows")
@files = $gitea_client.get_repos_contents_by_owner_repo_filepath(@project&.owner&.login, @project&.identifier, ".gitea/workflows") rescue []
@action_runs = Gitea::ActionRun.where(repo_id: @project.gpid)
@action_runs = @action_runs.where(id: params[:ids].split(",")) if params[:ids].present?
@action_runs = @action_runs.where(workflow_id: params[:workflow_ids].split(",")) if params[:workflow_ids].present?