forked from Gitlink/forgeplus
修復:detail報錯
This commit is contained in:
parent
e8348194b7
commit
a0b4da4247
|
@ -1,4 +1,3 @@
|
|||
json.empty @result[:repo]["empty"]
|
||||
json.content @project.content
|
||||
json.website @project.website
|
||||
json.lesson_url @project.lesson_url
|
||||
|
@ -47,6 +46,7 @@ json.fork_info do
|
|||
end
|
||||
end
|
||||
if @result[:repo]
|
||||
json.empty @result[:repo]["empty"]
|
||||
json.size replace_bytes_to_b(number_to_human_size(@result[:repo]['size'].to_i*1024))
|
||||
json.ssh_url @result[:repo]['ssh_url']
|
||||
json.clone_url @project.educoder? ? "#{Rails.application.config_for(:configuration)['educoder']['git_site']}/#{@project&.project_educoder&.repo_name}.git" : @result[:repo]['clone_url']
|
||||
|
@ -55,6 +55,7 @@ if @result[:repo]
|
|||
json.full_name @result[:repo]['full_name']
|
||||
json.private @result[:repo]['private']
|
||||
else
|
||||
json.empty true
|
||||
json.size 0
|
||||
json.ssh_url nil
|
||||
json.clone_url nil
|
||||
|
|
Loading…
Reference in New Issue