From 152c1abd9037eab4bbb95593e56b224bd70fd18e Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Mon, 15 May 2023 20:14:56 +0800 Subject: [PATCH] fix pull mirror --- templates/repo/header.tmpl | 2 +- templates/repo/settings/options.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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}}