mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-11 07:15:55 +08:00
fix: contributor error rescue
This commit is contained in:
@@ -150,7 +150,8 @@ class RepositoriesController < ApplicationController
|
||||
if params[:filepath].present? || @project.educoder?
|
||||
@contributors = []
|
||||
else
|
||||
@contributors = Gitea::Repository::Contributors::GetService.call(@owner, @repository.identifier)
|
||||
result = Gitea::Repository::Contributors::GetService.call(@owner, @repository.identifier)
|
||||
@contributors = result.is_a?(Hash) && result.key?(:status) ? [] : result
|
||||
end
|
||||
rescue
|
||||
@contributors = []
|
||||
|
||||
Reference in New Issue
Block a user