From 0c85516a56d6c212faba755bf89be6d53efb41e2 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Tue, 18 Jul 2023 13:58:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=A1=E7=8C=AE=E8=80=85=E4=B8=8D=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E6=97=B6=E5=8F=AA=E6=98=BE=E7=A4=BA=E9=82=AE=E7=AE=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index c048767c..533f6a80 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -166,9 +166,8 @@ class RepositoriesController < ApplicationController if params[:filepath].present? || @project.educoder? @contributors = [] else - result = Gitea::Repository::Contributors::GetService.call(@owner, @repository.identifier, {page: params[:page], limit: params[:limit]}) - @total_count = result[:total_count] - @contributors = result.is_a?(Hash) ? result[:body] : [] + result = Gitea::Repository::Contributors::GetService.call(@owner, @repository.identifier) + @contributors = result.is_a?(Hash) && result.key?(:status) ? [] : result end rescue @contributors = []