Browse Source

FIX get mirror url bug

tags/v3.0.3^2
jasder 5 years ago
parent
commit
b162b3357a
2 changed files with 6 additions and 1 deletions
  1. +1
    -1
      app/helpers/projects_helper.rb
  2. +5
    -0
      app/models/repository.rb

+ 1
- 1
app/helpers/projects_helper.rb View File

@@ -41,7 +41,7 @@ module ProjectsHelper
tmp_json = tmp_json.merge({
mirror_status: repo.mirror_status,
mirror_num: repo.mirror_num,
mirror_url: repo.source_clone_url || repo.mirror_url,
mirror_url: repo.remote_mirror_url,
first_sync: repo.first_sync?
})
end


+ 5
- 0
app/models/repository.rb View File

@@ -78,4 +78,9 @@ class Repository < ApplicationRecord
end
end

def remote_mirror_url
source_clone_url.blank? ? mirror_url : source_clone_url
end

end

Loading…
Cancel
Save