fix: tiny fix

This commit is contained in:
lexiaozhang 2023-10-06 00:04:01 +08:00
parent 7020e5a040
commit c61d11bf83
1 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@ class ProjectsController < ApplicationController
# result = Gitea::Repository::Branches::ListService.call(@owner, @project.identifier)
result = Gitea::Repository::Branches::ListNameService.call(@owner, @project.identifier, params[:name])
@branches = result.is_a?(Hash) ? (result.key?(:status) ? [] : result) : result
end
end
def branches_slice
return @branches = [] unless @project.forge?
@ -303,7 +303,7 @@ class ProjectsController < ApplicationController
time_interval = params[:time_interval]
if period.present? && time_interval.present?
project_evaluation_ids = ProjectEvaluationTop.where(evaluation_period: period, time_interval: time_interval)
.pluck(:project_id)
.pluck(:project_id)
custom_params = {
ids: project_evaluation_ids.join(","),