FIX get mirror url bug
This commit is contained in:
parent
c67686bdf5
commit
b162b3357a
|
@ -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
|
||||
|
|
|
@ -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…
Reference in New Issue