diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index beea89399e99..4e92532bde45 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -39,7 +39,7 @@ {{end}} - {{if $.IsPullMirror}} + {{if and $.IsPullMirror $.Mirror}} {{$address := MirrorRemoteAddress $.Context . $.Mirror.GetRemoteName false}}
{{$.locale.Tr "repo.mirror_from"}} {{$address.Address}}
{{end}} diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 0a64492d364b..e205b9330d2c 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -88,7 +88,7 @@ {{end}} - {{if .Repository.IsMirror}} + {{if and .Repository.IsMirror .Mirror}} {{(MirrorRemoteAddress $.Context .Repository .Mirror.GetRemoteName false).Address}}