forked from Trustie/forgeplus
贡献者不存在时只显示邮箱
This commit is contained in:
parent
f4183a42cf
commit
0c85516a56
|
|
@ -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 = []
|
||||
|
|
|
|||
Loading…
Reference in New Issue