Browse Source

fix: contributor error rescue

tags/v4.0.0^2
yystopf 4 years ago
parent
commit
099fc52e00
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      app/controllers/repositories_controller.rb

+ 2
- 1
app/controllers/repositories_controller.rb View File

@@ -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 = []


Loading…
Cancel
Save